[rhel7-branch] Actually show an error message for bad passwords in TUI. (#1066988)

Anne Mulhern amulhern at redhat.com
Wed Sep 17 21:02:52 UTC 2014





----- Original Message -----
> From: "Samantha N. Bueno" <sbueno+anaconda at redhat.com>
> To: anaconda-patches at lists.fedorahosted.org
> Sent: Wednesday, September 17, 2014 3:36:08 PM
> Subject: [rhel7-branch] Actually show an error message for bad passwords in	TUI. (#1066988)
> 
> Resolves: rhbz#1066988
> ---
>  pyanaconda/ui/tui/spokes/__init__.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/pyanaconda/ui/tui/spokes/__init__.py
> b/pyanaconda/ui/tui/spokes/__init__.py
> index 39b47b9..ef9132d 100644
> --- a/pyanaconda/ui/tui/spokes/__init__.py
> +++ b/pyanaconda/ui/tui/spokes/__init__.py
> @@ -121,7 +121,7 @@ class EditTUIDialog(NormalTUISpoke):
>                  if strength < 50:
>                      raise PWQError("The password you have provided is
>                      weak.")
>              except PWQError as e:
> -                error = _("You have provided a weak password: %s. " %
> e.message)
> +                error = _("You have provided a weak password: %s. " % e[1])
>                  error += _("\nWould you like to use it anyway?")
>                  question_window = YesNoDialog(self._app, error)
>                  self._app.switch_screen_modal(question_window)
> --
> 1.9.3
> 
> _______________________________________________
> anaconda-patches mailing list
> anaconda-patches at lists.fedorahosted.org
> https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches
> 

I think you need to split the string into two parts like:

error = _("You have...: %s") % e[1]

- mulhern


More information about the anaconda-patches mailing list