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

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



rs.get_members() also returns subsets with layered raids, we only
want the devices, so filter the result of rs.get_members() .
---
 iw/filter_gui.py |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

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


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