[PATCH 1/2] Move where the password quality checker is created (#956049).

Chris Lumens clumens at redhat.com
Thu Apr 25 17:46:47 UTC 2013


It needs to be created before we set text in the password fields, or it'll get
called then and not yet exist.
---
 pyanaconda/ui/gui/spokes/user.py | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/pyanaconda/ui/gui/spokes/user.py b/pyanaconda/ui/gui/spokes/user.py
index cd2384a..646bbdb 100644
--- a/pyanaconda/ui/gui/spokes/user.py
+++ b/pyanaconda/ui/gui/spokes/user.py
@@ -175,6 +175,13 @@ class UserSpoke(FirstbootSpokeMixIn, NormalSpoke):
             self.username: True
             }
 
+        # set up passphrase quality checker
+        self._pwq = pwquality.PWQSettings()
+        self._pwq.read_config()
+
+        self.pw_bar = self.builder.get_object("password_bar")
+        self.pw_label = self.builder.get_object("password_label")
+
         # indicate when the password was set by kickstart
         self._user.password_kickstarted = self.data.user.seen
         if self._user.password_kickstarted:
@@ -187,13 +194,6 @@ class UserSpoke(FirstbootSpokeMixIn, NormalSpoke):
                 self.pw.set_placeholder_text(_("The password was set by kickstart."))
                 self.confirm.set_placeholder_text(_("The password was set by kickstart."))
 
-        # set up passphrase quality checker
-        self._pwq = pwquality.PWQSettings()
-        self._pwq.read_config()
-
-        self.pw_bar = self.builder.get_object("password_bar")
-        self.pw_label = self.builder.get_object("password_label")
-
         self._advanced = AdvancedUserDialog(self._user, self._groupDict,
                                             self.data)
         self._advanced.initialize()
-- 
1.8.1.2



More information about the anaconda-patches mailing list