[PATCH] Don't traceback if there are no partitioned device (#1007683)
Martin Kolman
mkolman at redhat.com
Mon Oct 14 19:35:44 UTC 2013
Signed-off-by: Martin Kolman <mkolman at redhat.com>
---
iw/partition_gui.py | 16 +++++++++++-----
1 file changed, 11 insertions(+), 5 deletions(-)
diff --git a/iw/partition_gui.py b/iw/partition_gui.py
index 3751c5e..8cf9ca3 100644
--- a/iw/partition_gui.py
+++ b/iw/partition_gui.py
@@ -1570,11 +1570,17 @@ class PartitionWindow(InstallWindow):
""" createCB wrapper
Blocks and unblocks handlers for the other buttons """
-
- self._blockButtonHandlers("create")
- gui.processEvents()
- self.createCB(*args)
- self._unblockButtonHandlers("create")
+ # only activate the create dialog if there are
+ # partioned devices
+ if not self.storage.partitioned:
+ self.intf.messageWindow(_("Error Partitioning"),
+ _("No partitioned disks found."),
+ custom_icon="error")
+ else:
+ self._blockButtonHandlers("create")
+ gui.processEvents()
+ self.createCB(*args)
+ self._unblockButtonHandlers("create")
def resetCB(self, *args):
if not confirmResetPartitionState(self.intf):
--
1.8.3.1
More information about the anaconda-patches
mailing list