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

Re: [PATCH 1/2] Fix traceback in filter_gui.py when dealing with RAID10 BIOSRAID (#565444)



> diff --git a/iw/filter_gui.py b/iw/filter_gui.py
> index 1c17730..00ec5c9 100644
> --- a/iw/filter_gui.py
> +++ b/iw/filter_gui.py
> @@ -656,7 +656,11 @@ class FilterWindow(InstallWindow):
>              size = int(partedDevice.getSize())
>              fstype = ""
>  
> -            members = map(lambda m: m.get_devpath(), list(rs.get_members()))
> +            # get_members also returns subsets with layered raids, we only
> +            # want the devices
> +            members = filter(lambda m: isinstance(m, block.device.RaidDev),
> +                             list(rs.get_members()))
> +            members = map(lambda m: m.get_devpath(), members)
>              for d in raids:
>                  if udev_device_get_name(d) in members:
>                      fstype = udev_device_get_format(d)

This look fine to me, though using "isinstance" always makes me wonder
if I'm doing it wrong.

Looking at the bug, could you attach tracebacks in the future?  The rest
of us would probably like to see what the actual error is.  Thanks.

- Chris


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