summaryrefslogtreecommitdiff
path: root/src/leap
diff options
context:
space:
mode:
Diffstat (limited to 'src/leap')
-rw-r--r--src/leap/gui/twisted_main.py7
1 files changed, 6 insertions, 1 deletions
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')