diff options
author | Radek Vykydal <rvykydal@redhat.com> | 2009-04-03 15:01:10 +0200 |
---|---|---|
committer | Radek Vykydal <rvykydal@redhat.com> | 2009-04-07 12:37:13 +0200 |
commit | a68b243a8e9c3c7c2dc5f56aaf452532cf0b4b63 (patch) | |
tree | 558344a84a35c8399971e718cb9520a413f36564 /iw | |
parent | b1e25ef9c6ca923568c4ec7f2bb7d662eb9746a3 (diff) | |
download | anaconda-a68b243a8e9c3c7c2dc5f56aaf452532cf0b4b63.tar.gz anaconda-a68b243a8e9c3c7c2dc5f56aaf452532cf0b4b63.tar.xz anaconda-a68b243a8e9c3c7c2dc5f56aaf452532cf0b4b63.zip |
Raise message, not exception when size set in LV dialog is too big.
Diffstat (limited to 'iw')
-rw-r--r-- | iw/lvm_dialog_gui.py | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/iw/lvm_dialog_gui.py b/iw/lvm_dialog_gui.py index 9a9566aa7..8f14003d3 100644 --- a/iw/lvm_dialog_gui.py +++ b/iw/lvm_dialog_gui.py @@ -627,7 +627,19 @@ class VolumeGroupEditor: origname = templv.lvname if not templv.exists: templv._name = lvname - templv.size = size + try: + templv.size = size + except ValueError: + self.intf.messageWindow(_("Not enough space"), + _("The logical volumes you have " + "configured require %d MB, but the " + "volume group only has %d MB. Please " + "either make the volume group larger " + "or make the logical volume(s) smaller.") + % (size, tempvg.size), + custom_icon="error") + continue + format = fmt_class(mountpoint=mountpoint) if self.lukscb and self.lukscb.get_active() and \ templv.format.type != "luks": |