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

[PATCH rhel6-branch 4/4] Check for sane mountpoint in raid 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/raid_dialog_gui.py |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/iw/raid_dialog_gui.py b/iw/raid_dialog_gui.py
index ff7672b..b1180af 100644
--- a/iw/raid_dialog_gui.py
+++ b/iw/raid_dialog_gui.py
@@ -33,6 +33,7 @@ from storage.devices import *
 from storage.deviceaction import *
 from partition_ui_helpers_gui import *
 from constants import *
+from partIntfHelpers import *
 
 import gettext
 _ = lambda x: gettext.ldgettext("anaconda", x)
@@ -168,7 +169,15 @@ class RaidEditor:
                 continue
 
             mountpoint = self.mountCombo.get_children()[0].get_text()
-            if 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
+
                 used = False
                 for (mp, dev) in self.storage.mountpoints.iteritems():
                     if mp == mountpoint and \
-- 
1.6.6.1


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