[PATCH] Fix display of weak password warning (#1011850)
Vratislav Podzimek
vpodzime at redhat.com
Fri Sep 27 12:39:09 UTC 2013
On Thu, 2013-09-26 at 16:44 -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:
ACK.
--
Vratislav Podzimek
Anaconda Rider | Red Hat, Inc. | Brno - Czech Republic
More information about the anaconda-patches
mailing list