[PATCH 4/5] Fix a traceback when removing non-existing partitions in custom. (#869839)

David Lehman dlehman at redhat.com
Mon Oct 29 20:30:14 UTC 2012


---
 pyanaconda/ui/gui/spokes/custom.py |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/pyanaconda/ui/gui/spokes/custom.py b/pyanaconda/ui/gui/spokes/custom.py
index a134c2a..a638d62 100644
--- a/pyanaconda/ui/gui/spokes/custom.py
+++ b/pyanaconda/ui/gui/spokes/custom.py
@@ -1693,7 +1693,8 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
 
         # If we've just removed the last partition and the disklabel is pre-
         # existing, reinitialize the disk.
-        if device.type == "partition" and device.disk.format.exists:
+        if device.type == "partition" and device.exists and \
+           device.disk.format.exists:
             with ui_storage_logger():
                 if self.__storage.shouldClear(device.disk):
                     self.__storage.initializeDisk(device.disk)
-- 
1.7.7.6



More information about the anaconda-patches mailing list