[PATCH] Fix pylint problem for #1066988.

Anne Mulhern amulhern at redhat.com
Mon Sep 29 15:48:45 UTC 2014





----- Original Message -----
> From: "Samantha N. Bueno" <sbueno+anaconda at redhat.com>
> To: anaconda-patches at lists.fedorahosted.org
> Sent: Monday, September 29, 2014 10:48:17 AM
> Subject: [PATCH] Fix pylint problem for #1066988.
> 
> Related: rhbz#1066988
> ---
>  pyanaconda/ui/tui/spokes/__init__.py | 15 +++++++--------
>  1 file changed, 7 insertions(+), 8 deletions(-)
> 
> diff --git a/pyanaconda/ui/tui/spokes/__init__.py
> b/pyanaconda/ui/tui/spokes/__init__.py
> index 76bed4b..1a6b718 100644
> --- a/pyanaconda/ui/tui/spokes/__init__.py
> +++ b/pyanaconda/ui/tui/spokes/__init__.py
> @@ -127,14 +127,13 @@ class EditTUIDialog(NormalTUISpoke):
>                      error = _("The password you have provided is weak")
>              except PWQError as e:
>                  error = e[1]
> -            finally:
> -                if error:
> -                    error = _("You have provided a weak password: %s. ") %
> error
> -                    error += _("\nWould you like to use it anyway?")
> -                    question_window = YesNoDialog(self._app, error)
> -                    self._app.switch_screen_modal(question_window)
> -                    if not question_window.answer:
> -                        return None
> +            if error:
> +                error = _("You have provided a weak password: %s. ") % error
> +                error += _("\nWould you like to use it anyway?")
> +                question_window = YesNoDialog(self._app, error)
> +                self._app.switch_screen_modal(question_window)
> +                if not question_window.answer:
> +                    return None
>  
>              self.value = cryptPassword(pw)
>              return None
> --
> 1.9.3
> 
> _______________________________________________
> anaconda-patches mailing list
> anaconda-patches at lists.fedorahosted.org
> https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches
> 

This should also work.

- mulhern


More information about the anaconda-patches mailing list