From 212102f05bbc09b0b6cc6fa250eaafc8f80b6824 Mon Sep 17 00:00:00 2001 From: kali Date: Fri, 17 May 2013 00:45:06 +0900 Subject: catch reactor not running error --- src/leap/gui/twisted_main.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/leap/gui/twisted_main.py b/src/leap/gui/twisted_main.py index 44f532a4..871af577 100644 --- a/src/leap/gui/twisted_main.py +++ b/src/leap/gui/twisted_main.py @@ -19,6 +19,8 @@ Main functions for integration of twisted reactor """ import logging +from twisted.internet import error + # Resist the temptation of putting the import reactor here, # it will raise an "reactor already imported" error. @@ -46,4 +48,7 @@ def quit(app): """ from twisted.internet import reactor logger.debug('stopping twisted reactor') - reactor.stop() + try: + reactor.stop() + except error.ReactorNotRunning: + logger.debug('reactor not running') -- cgit v1.2.3