[PATCH 1/2] Parent list length doesn't reflect new member in _addParent.

Anne Mulhern amulhern at redhat.com
Mon Mar 31 12:25:10 UTC 2014





----- Original Message -----
> From: "David Lehman" <dlehman at redhat.com>
> To: anaconda-patches at lists.fedorahosted.org
> Sent: Friday, March 28, 2014 4:24:06 PM
> Subject: [PATCH 1/2] Parent list length doesn't reflect new member in	_addParent.
> 
> The new parent doesn't get added until after _addParent returns.
> ---
>  blivet/devices.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/blivet/devices.py b/blivet/devices.py
> index cb19d84..d568d8e 100644
> --- a/blivet/devices.py
> +++ b/blivet/devices.py
> @@ -2500,7 +2500,7 @@ class LVMVolumeGroupDevice(ContainerDevice):
>              self.setup()
>  
>          if (self.exists and member.format.exists and
> -            len(self.parents) == self.pvCount):
> +            len(self.parents) + 1 == self.pvCount):
>              self._complete = True
>  
>      def _removeParent(self, member):
> --
> 1.9.0
> 
> _______________________________________________
> anaconda-patches mailing list
> anaconda-patches at lists.fedorahosted.org
> https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches
> 

Is there a way to get rid of self._complete entirely, i.e., is it
a function of some other fields? I'm wondering what sort of history
of the device _complete keeps. If it only keeps information about the
state of the device, then it would be worthwhile to get rid of it. And if not,
definitely worthwhile to document what ti does track.

- mulhern


More information about the anaconda-patches mailing list