summaryrefslogtreecommitdiffstats
path: root/textw/partition_text.py
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2007-01-03 21:53:16 +0000
committerJeremy Katz <katzj@redhat.com>2007-01-03 21:53:16 +0000
commitcf660a83c0728f0babff1cd4b780dab57fa597ec (patch)
tree83176c6442b90f5f98c3c441f4f21e6b8bd3f03a /textw/partition_text.py
parent6d28b38cf8e543415d151b93a36b0c1848b4300b (diff)
downloadanaconda-cf660a83c0728f0babff1cd4b780dab57fa597ec.tar.gz
anaconda-cf660a83c0728f0babff1cd4b780dab57fa597ec.tar.xz
anaconda-cf660a83c0728f0babff1cd4b780dab57fa597ec.zip
2007-01-03 Jeremy Katz <katzj@redhat.com>
* textw/partition_text.py (PartitionWindow.editLVRequest): Don't traceback if they neglect to enter an lvsize (#221253)
Diffstat (limited to 'textw/partition_text.py')
-rw-r--r--textw/partition_text.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/textw/partition_text.py b/textw/partition_text.py
index 44fdecd77..2bb8cfa6e 100644
--- a/textw/partition_text.py
+++ b/textw/partition_text.py
@@ -1284,7 +1284,15 @@ class PartitionWindow:
request.logicalVolumeName = lvn
- size = int(lvsize.value().strip())
+ try:
+ size = int(lvsize.value().strip())
+ except:
+ self.intf.messageWindow(_("Illegal size"),
+ _("The requested size as entered is "
+ "not a valid number greater "
+ "than 0."), custom_icon="error")
+ continue
+
pesize = vgreq.pesize
size = lvm.clampLVSizeRequest(size, pesize, roundup=1)