[PATCH] [PATCH] Don't traceback if there are no partitioned device (#1007683)

Martin Kolman mkolman at redhat.com
Tue Oct 15 16:15:33 UTC 2013


Disable the create dialog if an unpartitioned device is selected.

Signed-off-by: Martin Kolman <mkolman at redhat.com>
---
 iw/partition_gui.py | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/iw/partition_gui.py b/iw/partition_gui.py
index 3751c5e..e5d362f 100644
--- a/iw/partition_gui.py
+++ b/iw/partition_gui.py
@@ -1346,7 +1346,14 @@ class PartitionWindow(InstallWindow):
         # First we must decide what parts of the create_storage_dialog
         # we will activate.
 
+        # get the currently selected device
+        device = self.tree.getCurrentDevice()
+
+        # check if the current device is partitioned,
+        # if it isn't, we don't support it
         activate_create_partition = True
+        if device:
+            activate_create_partition = device.partitioned
 
         # We activate the create Volume Group radio button if there is a free
         # partition with a Physical Volume format.
-- 
1.8.3.1



More information about the anaconda-patches mailing list