From 8ffe7220530bac0fdbc909bf8a6dc8599660d781 Mon Sep 17 00:00:00 2001 From: Adam Blackburn Date: Thu, 19 Feb 2009 22:59:40 -0600 Subject: [PATCH] Added check for loop before exiting loop --- curses/wicd-curses.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/curses/wicd-curses.py b/curses/wicd-curses.py index 4ecfe4e..488107a 100644 --- a/curses/wicd-curses.py +++ b/curses/wicd-curses.py @@ -99,7 +99,8 @@ class wrap_exceptions: raise except : # Quit the loop - loop.quit() + if 'loop' in locals(): + loop.quit() # Zap the screen ui.stop() # Print out standard notification: