diff options
author | Brian C. Lane <bcl@redhat.com> | 2010-05-18 11:44:25 -0700 |
---|---|---|
committer | Brian C. Lane <bcl@redhat.com> | 2010-05-20 15:28:32 -0700 |
commit | 1c4026e06fbfcc4ff6bcf37d76325daf969fdc9f (patch) | |
tree | b1f42266406c11e778015f466da47206b778b91f | |
parent | c2dd5a08f65c2c2ff7b19548199b1436f9dfcbbc (diff) | |
download | anaconda-1c4026e06fbfcc4ff6bcf37d76325daf969fdc9f.tar.gz anaconda-1c4026e06fbfcc4ff6bcf37d76325daf969fdc9f.tar.xz anaconda-1c4026e06fbfcc4ff6bcf37d76325daf969fdc9f.zip |
Check for sane mountpoint in partition dialog (#592185)
Resolves: rhbz#592185
Display a message to the user when the mountpoint name they have
chosen is invalid. Skip checking when the format type has no mountpoint.
-rw-r--r-- | iw/partition_dialog_gui.py | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/iw/partition_dialog_gui.py b/iw/partition_dialog_gui.py index 8f3d320cb..9064af4de 100644 --- a/iw/partition_dialog_gui.py +++ b/iw/partition_dialog_gui.py @@ -30,6 +30,7 @@ from storage.devices import PartitionDevice, LUKSDevice from storage.deviceaction import * from partition_ui_helpers_gui import * from constants import * +from partIntfHelpers import * import gettext _ = lambda x: gettext.ldgettext("anaconda", x) @@ -110,10 +111,15 @@ class PartitionEditor: return [] mountpoint = self.mountCombo.get_children()[0].get_text() - if mountpoint == _("<Not Applicable>"): - mountpoint = "" + (sensitive,) = self.mountCombo.get_properties('sensitive') + if sensitive and mountpoint: + msg = sanityCheckMountPoint(mountpoint) + if msg: + self.intf.messageWindow(_("Mount Point Error"), + msg, + custom_icon="error") + continue - if mountpoint: used = False for (mp, dev) in self.storage.mountpoints.iteritems(): if mp == mountpoint and \ |