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

[PATCH 3/5] Fix DeviceTree to function in the absence of an InstallInterface.



---
 pyanaconda/storage/devicetree.py |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/pyanaconda/storage/devicetree.py b/pyanaconda/storage/devicetree.py
index 25b1dfe..039f1ff 100644
--- a/pyanaconda/storage/devicetree.py
+++ b/pyanaconda/storage/devicetree.py
@@ -1066,6 +1066,8 @@ class DeviceTree(object):
             initcb = lambda: False
         elif self.zeroMbr:
             initcb = lambda: True
+        elif not self.intf:
+            initcb = lambda: False
         else:
             description = device.description or device.model
             try:
@@ -1588,8 +1590,9 @@ class DeviceTree(object):
                 # if zeroMbr is true don't ask.
                 if not self._cleanup and \
                    (self.zeroMbr or
-                    self.intf.questionReinitInconsistentLVM(pv_names=paths,
-                                                            vg_name=device.name)):
+                    (self.intf and
+                     self.intf.questionReinitInconsistentLVM(pv_names=paths,
+                                                            vg_name=device.name))):
                     reinitializeVG(device)
                 else:
                     # The user chose not to reinitialize.
@@ -1617,7 +1620,7 @@ class DeviceTree(object):
             if c.kids == 0:
                 self.unusedRaidMembers.extend(map(lambda m: m.name, c.devices))
 
-        if not self._cleanup:
+        if self.unusedRaidMembers and not self._cleanup and self.intf:
             self.intf.unusedRaidMembersWarning(self.unusedRaidMembers)
 
     def _setupLvs(self):
-- 
1.7.3.4


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