[PATCH] Catch OverflowError in manual partitioning.
Samantha N. Bueno
sbueno+anaconda at redhat.com
Mon Nov 26 15:48:29 UTC 2012
Instead of crashing, inform users they should use integer values when
entering partition sizes.
---
pyanaconda/ui/gui/spokes/custom.py | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/pyanaconda/ui/gui/spokes/custom.py
b/pyanaconda/ui/gui/spokes/custom.py
index 515a9a7..8622b1f 100644
--- a/pyanaconda/ui/gui/spokes/custom.py
+++ b/pyanaconda/ui/gui/spokes/custom.py
@@ -1629,6 +1629,13 @@ class CustomPartitioningSpoke(NormalSpoke,
StorageChecker):
_("Failed to add new device. Click for "
"details."))
self.window.show_all()
+ except OverflowError as e:
+ log.error("invalid size set for partition")
+ self._error = e
+ self.window.set_info(Gtk.MessageType.ERROR,
+ _("Invalid partition size set. Use a "
+ "valid integer."))
+ self.window.show_all()
self._devices = self.__storage.devices
self._do_refresh()
--
1.7.11.7
More information about the anaconda-patches
mailing list