summaryrefslogtreecommitdiff
path: root/src/leap/bitmask/frontend_app.py
diff options
context:
space:
mode:
authorIvan Alejandro <ivanalejandro0@gmail.com>2014-06-25 12:36:25 -0300
committerIvan Alejandro <ivanalejandro0@gmail.com>2014-07-14 12:14:20 -0300
commitc46a93e290194cdeb1b4e1776d4bf0edde303072 (patch)
treed4e3b043228fe27da8d6bcb3e1924d5b76ac6d9b /src/leap/bitmask/frontend_app.py
parentd35f12b00629d6578039a11ce5e18d0c58e3fa73 (diff)
Add SIGINT handler.
Diffstat (limited to 'src/leap/bitmask/frontend_app.py')
-rw-r--r--src/leap/bitmask/frontend_app.py22
1 files changed, 5 insertions, 17 deletions
diff --git a/src/leap/bitmask/frontend_app.py b/src/leap/bitmask/frontend_app.py
index 12703518..60f20e3c 100644
--- a/src/leap/bitmask/frontend_app.py
+++ b/src/leap/bitmask/frontend_app.py
@@ -18,8 +18,6 @@ import signal
import sys
import os
-from functools import partial
-
from PySide import QtCore, QtGui
from leap.bitmask.config import flags
@@ -41,18 +39,6 @@ def sigint_handler(*args, **kwargs):
mainwindow.quit()
-def sigterm_handler(*args, **kwargs):
- """
- Signal handler for SIGTERM.
- This handler is actually passed to twisted reactor
- """
- logger = kwargs.get('logger', None)
- if logger:
- logger.debug("SIGTERM catched. shutting down...")
- mainwindow = args[0]
- mainwindow.quit()
-
-
def run_frontend(options):
"""
Run the GUI for the application.
@@ -88,10 +74,12 @@ def run_frontend(options):
qApp.setApplicationName("leap")
qApp.setOrganizationDomain("leap.se")
- window = MainWindow(start_hidden=start_hidden)
+ MainWindow(start_hidden=start_hidden)
- sigint_window = partial(sigint_handler, window, logger=logger)
- signal.signal(signal.SIGINT, sigint_window)
+ # sigint_window = partial(sigint_handler, window, logger=logger)
+ # signal.signal(signal.SIGINT, sigint_window)
+ # Ensure that the application quits using CTRL-C
+ signal.signal(signal.SIGINT, signal.SIG_DFL)
sys.exit(qApp.exec_())