[master][PATCH] Check _current_action for not being None before using it

Vratislav Podzimek vpodzime at redhat.com
Thu Mar 7 15:46:41 UTC 2013


It may happen that _current_action is None even when self._actions is
not None and not empty.
---
 pyanaconda/ui/gui/__init__.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pyanaconda/ui/gui/__init__.py b/pyanaconda/ui/gui/__init__.py
index 1e432d4..7ace103 100644
--- a/pyanaconda/ui/gui/__init__.py
+++ b/pyanaconda/ui/gui/__init__.py
@@ -309,7 +309,7 @@ class GraphicalUserInterface(UserInterface):
         from gi.repository import AnacondaWidgets
 
         # if there are no actions (not populated yet), we can do nothing
-        if len(self._actions) > 0:
+        if len(self._actions) > 0 and self._currentAction:
             lightbox = AnacondaWidgets.lb_show_over(self._currentAction.window)
             window.main_window.set_transient_for(lightbox)
 
-- 
1.7.11.7



More information about the anaconda-patches mailing list