[PATCH] Fix display of weak password warning (#1011850)
Samantha N. Bueno
sbueno+anaconda at redhat.com
Fri Sep 27 12:34:06 UTC 2013
On Thu, Sep 26, 2013 at 04:44:05PM -0400, David Shea wrote:
> Only display the error message from libpwquality if one has been set.
> ---
> pyanaconda/ui/gui/spokes/user.py | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/pyanaconda/ui/gui/spokes/user.py b/pyanaconda/ui/gui/spokes/user.py
> index 39f7c42..aca7d95 100644
> --- a/pyanaconda/ui/gui/spokes/user.py
> +++ b/pyanaconda/ui/gui/spokes/user.py
> @@ -548,8 +548,12 @@ class UserSpoke(FirstbootSpokeMixIn, NormalSpoke):
> if self._waivePasswordClicks > 1:
> return None
> elif self._waivePasswordClicks == 1:
> - return _("You have provided a weak password: %s. "
> - " Press Done again to use anyway.") % self._pwq_error
> + if self._pwq_error:
> + return _("You have provided a weak password: %s. "
> + " Press Done again to use anyway.") % self._pwq_error
> + else:
> + return _("You have provided a weak password. "
> + " Press Done again to use anyway.")
> else:
> error = _("The password you have provided is weak")
> if self._pwq_error:
> --
> 1.8.3.1
Ack.
More information about the anaconda-patches
mailing list