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

[PATCH 2/2] Don't offer minors of ignored md devices when creating new md devices.



Resolves: rhbz#559973
---
 pyanaconda/iw/raid_dialog_gui.py |   20 +++++++++++---------
 1 files changed, 11 insertions(+), 9 deletions(-)

diff --git a/pyanaconda/iw/raid_dialog_gui.py b/pyanaconda/iw/raid_dialog_gui.py
index 236e34b..aeeb8f1 100644
--- a/pyanaconda/iw/raid_dialog_gui.py
+++ b/pyanaconda/iw/raid_dialog_gui.py
@@ -101,18 +101,20 @@ class RaidEditor:
 
     def createRaidMinorMenu(self, minors, reqminor):
         minorcombo = datacombo.DataComboBox()
-	defindex = 0
-	i = 0
-	for minor in minors:
-            minorcombo.append("md%d" %(minor,), minor)
-	    if reqminor and minor == reqminor:
-		defindex = i
-	    i = i + 1
+        defindex = 0
+        i = 0
+        for minor in minors:
+            name = "md%d" % minor
+            if name in self.storage.devicetree._ignoredDisks:
+                continue
+            minorcombo.append(name, minor)
+            if reqminor and minor == reqminor:
+                defindex = i
+            i = i + 1
 
         minorcombo.set_active(defindex)
 
-	return minorcombo
-
+        return minorcombo
 
     def raidlevelchangeCB(self, widget, sparesb):
 	raidlevel = widget.get_model()[widget.get_active()][0]
-- 
1.7.2.3


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