[rhel7-branch] Only pass DASDs to is_ldl_dasd function. (#1248666)

Samantha N. Bueno sbueno+anaconda at redhat.com
Tue Aug 4 20:05:24 UTC 2015


This might seem obvious, but it apparently wasn't when I wrote this
code!

Resolves: rhbz#1248666
---
 pyanaconda/ui/gui/spokes/storage.py | 4 ++--
 pyanaconda/ui/tui/spokes/storage.py | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/pyanaconda/ui/gui/spokes/storage.py b/pyanaconda/ui/gui/spokes/storage.py
index 5adbb09..25b27e6 100644
--- a/pyanaconda/ui/gui/spokes/storage.py
+++ b/pyanaconda/ui/gui/spokes/storage.py
@@ -682,7 +682,7 @@ class StorageSpoke(NormalSpoke, StorageChecker):
                     continue
 
         if cdl:
-            ldldasds = [d.name for d in getDisks(self.storage.devicetree) if is_ldl_dasd(d.name)]
+            ldldasds = [d.name for d in getDisks(self.storage.devicetree.dasd) if is_ldl_dasd(d.name)]
             if not ldldasds:
                 # nothing to do here; bail
                 return
@@ -853,7 +853,7 @@ class StorageSpoke(NormalSpoke, StorageChecker):
                     return
 
             # check for ldl dasds
-            ldldasds = [d for d in self.selected_disks if is_ldl_dasd(d)]
+            ldldasds = [d.name for d in self.storage.devicetree.dasd if is_ldl_dasd(d.name)]
             if len(ldldasds) > 0:
                 dialog = DasdFormatDialog(self.data, self.storage, ldldasds)
                 ignoreEscape(dialog.window)
diff --git a/pyanaconda/ui/tui/spokes/storage.py b/pyanaconda/ui/tui/spokes/storage.py
index c926a34..0895db4 100644
--- a/pyanaconda/ui/tui/spokes/storage.py
+++ b/pyanaconda/ui/tui/spokes/storage.py
@@ -276,7 +276,7 @@ class StorageSpoke(NormalTUISpoke):
                         if dasds:
                             self.run_dasdfmt(dasds)
                             return None
-                        ldldasds = [d for d in self.selected_disks if is_ldl_dasd(d)]
+                        ldldasds = [d.name for d in self.storage.devicetree.dasd if is_ldl_dasd(d.name)]
                         if ldldasds:
                             self.run_dasdfmt(ldldasds)
                             return None
-- 
1.9.3



More information about the anaconda-patches mailing list