[rhel7-branch 1/2] Make EditTUIDialog error generic (#1248421)

bcl installerbot-noreply at redhat.com
Fri Jul 31 17:34:22 UTC 2015


From: "Brian C. Lane" <bcl at redhat.com>

The base class should have a generic message, not one that is specific
to the username entry.

Related: rhbz#1248421
---
 pyanaconda/ui/tui/spokes/__init__.py | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/pyanaconda/ui/tui/spokes/__init__.py b/pyanaconda/ui/tui/spokes/__init__.py
index 456b5c8..b6d6288 100644
--- a/pyanaconda/ui/tui/spokes/__init__.py
+++ b/pyanaconda/ui/tui/spokes/__init__.py
@@ -97,7 +97,11 @@ class NormalTUISpoke(TUISpoke, NormalSpoke):
 # Inherit abstract methods from NormalTUISpoke
 # pylint: disable=abstract-method
 class EditTUIDialog(NormalTUISpoke):
-    """Spoke/dialog used to read new value of textual or password data"""
+    """Spoke/dialog used to read new value of textual or password data
+
+    To override the wrong input message set the wrong_input_message attribute
+    to a translated string.
+    """
 
     title = N_("New value")
     PASSWORD = re.compile(".*")
@@ -174,8 +178,7 @@ def input(self, entry, key):
             if self.wrong_input_message:
                 print(self.wrong_input_message)
             else:
-                print(_("You have provided an invalid user name: %s\n"
-                        "Tip: Keep your user name shorter than 32 characters and do not use spaces.\n") % key)
+                print(_("You have provided an invalid value\n"))
             return NormalTUISpoke.input(self, entry, key)
 
 class OneShotEditTUIDialog(EditTUIDialog):


-- 
To view this commit on github, visit https://github.com/rhinstaller/anaconda/commit/059938e544b970341df850700bdc09b919e2e3dc


More information about the anaconda-patches mailing list