[master 5/9] Stop setting inappropriate properties in ksdata.

dashea installerbot-noreply at redhat.com
Thu Oct 8 19:05:33 UTC 2015


From: David Shea <dshea at redhat.com>

You know what else can hold state for the spoke? The spoke.
---
 pyanaconda/ui/gui/spokes/user.py | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/pyanaconda/ui/gui/spokes/user.py b/pyanaconda/ui/gui/spokes/user.py
index cc47c0a..2d09385 100644
--- a/pyanaconda/ui/gui/spokes/user.py
+++ b/pyanaconda/ui/gui/spokes/user.py
@@ -261,7 +261,7 @@ def initialize(self):
             self.policy = self.data.anaconda.PwPolicyData()
 
         # indicate when the password was set by kickstart
-        self._user.password_kickstarted = self.data.user.seen
+        self._password_kickstarted = self.data.user.seen
 
         # Password checks, in order of importance:
         # - if a password is required, is one specified?
@@ -292,7 +292,7 @@ def initialize(self):
         # Modify the GUI based on the kickstart and policy information
         # This needs to happen after the input checks have been created, since
         # the Gtk signal handlers use the input check variables.
-        if self._user.password_kickstarted:
+        if self._password_kickstarted:
             self.usepassword.set_active(True)
             self.pw.set_placeholder_text(_("The password was set by kickstart."))
             self.confirm.set_placeholder_text(_("The password was set by kickstart."))
@@ -340,7 +340,7 @@ def apply(self):
         # this should preserve the kickstart based password
         if self.usepassword.get_active():
             if self.pw.get_text():
-                self._user.password_kickstarted = False
+                self._password_kickstarted = False
                 self._user.password = cryptPassword(self.pw.get_text())
                 self._user.isCrypted = True
                 self.pw.set_placeholder_text("")
@@ -352,7 +352,7 @@ def apply(self):
             self.confirm.set_placeholder_text("")
             self._user.password = ""
             self._user.isCrypted = False
-            self._user.password_kickstarted = False
+            self._password_kickstarted = False
 
         self._user.name = self.username.get_text()
         self._user.gecos = self.fullname.get_text()
@@ -468,11 +468,11 @@ def _checkPasswordEmpty(self, inputcheck):
         """
 
         # If the password was set by kickstart, skip the strength check
-        if self._user.password_kickstarted and not self.policy.changesok:
+        if self._password_kickstarted and not self.policy.changesok:
             return InputCheck.CHECK_OK
 
         # Skip the check if no password is required
-        if (not self.usepassword.get_active()) or self._user.password_kickstarted:
+        if (not self.usepassword.get_active()) or self._password_kickstarted:
             return InputCheck.CHECK_OK
         elif not self.get_input(inputcheck.input_obj):
             if inputcheck.input_obj == self.pw:
@@ -486,7 +486,7 @@ def _checkPasswordConfirm(self, inputcheck):
         """If the user has entered confirmation data, check whether it matches the password."""
 
         # Skip the check if no password is required
-        if (not self.usepassword.get_active()) or self._user.password_kickstarted:
+        if (not self.usepassword.get_active()) or self._password_kickstarted:
             result = InputCheck.CHECK_OK
         elif self.confirm.get_text() and (self.pw.get_text() != self.confirm.get_text()):
             result = _(PASSWORD_CONFIRM_ERROR_GUI)
@@ -504,7 +504,7 @@ def _checkPasswordStrength(self, inputcheck):
          """
 
         # Skip the check if no password is required
-        if not self.usepassword.get_active or self._user.password_kickstarted:
+        if not self.usepassword.get_active or self._password_kickstarted:
             return InputCheck.CHECK_OK
 
         # If the password is empty, clear the strength bar and skip this check


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


More information about the anaconda-patches mailing list