[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)




-            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)

Ack, but we could really strengthen the algorithms and stop using isinstance.


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