Re: [PATCH 2/4] Use getDevicesByInstance() for storage.partitions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



yep. seems right.
On Tue, Mar 17, 2009 at 10:22:53PM +0100, Hans de Goede wrote:
> ---
>  storage/__init__.py |    6 +-----
>  1 files changed, 1 insertions(+), 5 deletions(-)
> 
> diff --git a/storage/__init__.py b/storage/__init__.py
> index 08ba90a..b0789d6 100644
> --- a/storage/__init__.py
> +++ b/storage/__init__.py
> @@ -262,11 +262,7 @@ class Storage(object):
>              does not necessarily reflect the actual on-disk state of the
>              system's disks.
>          """
> -        partitions = []
> -        devices = self.devicetree.devices
> -        for d in devices:
> -            if isinstance(devices[d], PartitionDevice):
> -                partitions.append(devices[d])
> +        partitions = self.devicetree.getDevicesByInstance(PartitionDevice)
>          partitions.sort(key=lambda d: d.name)
>          return partitions
>  
> -- 
> 1.6.1.3
> 
> _______________________________________________
> Anaconda-devel-list mailing list
> Anaconda-devel-list@xxxxxxxxxx
> https://www.redhat.com/mailman/listinfo/anaconda-devel-list

-- 
Joel Andres Granados
Brno, Czech Republic, Red Hat.

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux