[PATCH] Fix pylint problem for #1066988.

Samantha N. Bueno sbueno+anaconda at redhat.com
Mon Sep 29 14:48:17 UTC 2014


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



More information about the anaconda-patches mailing list