From: "Vratislav Podzimek" <vpodzime(a)redhat.com>
To: "anaconda patch review" <anaconda-patches(a)lists.fedorahosted.org>
Sent: Friday, May 30, 2014 3:07:19 AM
Subject: Re: [blivet:master 04/26] Extract selection of members in completed() into a
separate method.
On Thu, 2014-05-29 at 14:47 -0400, mulhern wrote:
> Use it in completed().
>
> Signed-off-by: mulhern <amulhern(a)redhat.com>
> ---
> blivet/devices.py | 17 +++++++++++++----
> 1 file changed, 13 insertions(+), 4 deletions(-)
>
> diff --git a/blivet/devices.py b/blivet/devices.py
> index f13ba8a..e8004b7 100644
> --- a/blivet/devices.py
> +++ b/blivet/devices.py
> @@ -3605,13 +3605,22 @@ class MDRaidArrayDevice(ContainerDevice):
> return rc
>
> @property
> - def complete(self):
> + def members(self):
> + """ The list of this md array's members.
> +
> + If the array is a BIOS RAID array then its unique parent
> + is a container and its actual member devices are the
> + container's parents.
> + """
> if self.type == "mdbiosraidarray":
> - members = len(self.parents[0].parents)
> + members = self.parents[0].parents
> else:
> - members = len(self.parents)
> + members = self.parents
> + return members
I believe self.parents is an instance of the ParentList class and this
property is supposed to return a list. So something like
members = list(self.parents)
would be better.
--
Vratislav Podzimek
Anaconda Rider | Red Hat, Inc. | Brno - Czech Republic
_______________________________________________
anaconda-patches mailing list
anaconda-patches(a)lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches