summaryrefslogtreecommitdiffstats
path: root/iw
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2004-06-03 22:53:47 +0000
committerJeremy Katz <katzj@redhat.com>2004-06-03 22:53:47 +0000
commit1788fd827798abf0ea116828f208b17008b6a94d (patch)
treedb43ccdca267f9f7ccc1e22a8c60521bb1fad8ca /iw
parentf4d0856d4a153652477449d804168db2be3307cc (diff)
downloadanaconda-1788fd827798abf0ea116828f208b17008b6a94d.tar.gz
anaconda-1788fd827798abf0ea116828f208b17008b6a94d.tar.xz
anaconda-1788fd827798abf0ea116828f208b17008b6a94d.zip
clear the password/confirm entries if there's a problem with the password
Diffstat (limited to 'iw')
-rw-r--r--iw/account_gui.py14
1 files changed, 10 insertions, 4 deletions
diff --git a/iw/account_gui.py b/iw/account_gui.py
index 135a5d997..4a33b40fd 100644
--- a/iw/account_gui.py
+++ b/iw/account_gui.py
@@ -26,6 +26,12 @@ class AccountWindow (InstallWindow):
htmlTag = ("accts")
def getNext (self):
+ def passwordError():
+ self.pw.set_text("")
+ self.confirm.set_text("")
+ self.pw.grab_focus()
+ raise gui.StayOnScreen
+
if not self.__dict__.has_key("pw"): return None
pw = self.pw.get_text()
@@ -37,21 +43,21 @@ class AccountWindow (InstallWindow):
"and confirm it by typing it a second "
"time to continue."),
custom_icon="error")
- raise gui.StayOnScreen
+ passwordError()
if pw != confirm:
self.intf.messageWindow(_("Error with Password"),
_("The passwords you entered were "
"different. Please try again."),
custom_icon="error")
- raise gui.StayOnScreen
+ passwordError()
if len(pw) < 6:
self.intf.messageWindow(_("Error with Password"),
_("The root password must be at least "
"six characters long."),
custom_icon="error")
- raise gui.StayOnScreen
+ passwordError()
allowed = string.digits + string.ascii_letters + string.punctuation + " "
for letter in pw:
@@ -61,7 +67,7 @@ class AccountWindow (InstallWindow):
"non-ascii characters which are "
"not allowed for use in password."),
custom_icon="error")
- raise gui.StayOnScreen
+ passwordError()
self.rootPw.set (self.pw.get_text ())
return None