[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[PATCH rhel6-branch 3/4] Check for sane mountpoint in lvm 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.
---
 iw/lvm_dialog_gui.py |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/iw/lvm_dialog_gui.py b/iw/lvm_dialog_gui.py
index 7d1a262..2e9fda2 100644
--- a/iw/lvm_dialog_gui.py
+++ b/iw/lvm_dialog_gui.py
@@ -31,6 +31,7 @@ from partition_ui_helpers_gui import *
 from constants import *
 from storage.devices import *
 from storage.deviceaction import *
+from partIntfHelpers import *
 
 import gettext
 _ = lambda x: gettext.ldgettext("anaconda", x)
@@ -593,6 +594,14 @@ class VolumeGroupEditor:
                 fmt_class = self.fsoptionsDict["fstypeCombo"].get_active_value()
 
             mountpoint = mountCombo.get_children()[0].get_text().strip()
+            (sensitive,) = mountCombo.get_properties('sensitive')
+            if sensitive and mountpoint:
+                msg = sanityCheckMountPoint(mountpoint)
+                if msg:
+                    self.intf.messageWindow(_("Mount Point Error"),
+                                            msg,
+                                            custom_icon="error")
+                    continue
 
             # validate logical volume name
             lvname = lvnameentry.get_text().strip()
-- 
1.6.6.1


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]