[master/f21-branch] Filter out iso9660 devices from disk list (#874381)

Vratislav Podzimek vpodzime at redhat.com
Tue Oct 7 06:04:51 UTC 2014


On Mon, 2014-10-06 at 17:14 -0700, Brian C. Lane wrote:
> When installing from a USB device written with dd the device format type
> is iso9660, but it is also partitioned. Blivet filters out the
> partitions but Anaconda was still showing the device in the storage
> spoke.
> ---
>  pyanaconda/ui/lib/disks.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/pyanaconda/ui/lib/disks.py b/pyanaconda/ui/lib/disks.py
> index 9d4607f..0fb8f3f 100644
> --- a/pyanaconda/ui/lib/disks.py
> +++ b/pyanaconda/ui/lib/disks.py
> @@ -48,7 +48,7 @@ class FakeDisk(object):
>  
>  def getDisks(devicetree, fake=False):
>      if not fake:
> -        devices = devicetree.devices
> +        devices = filter(lambda d: d.format.type != "iso9660", devicetree.devices)
I think pylint and probably also Python 3 would yell at us for using
filter(). Use list comprehension, please. ACK otherwise.

-- 
Vratislav Podzimek

Anaconda Rider | Red Hat, Inc. | Brno - Czech Republic



More information about the anaconda-patches mailing list