From 8b5795bab9c0d7a7b946f951f59c74960445011c Mon Sep 17 00:00:00 2001 From: Alessio Treglia Date: Mon, 19 Mar 2012 21:48:11 +0100 Subject: [PATCH] Add SIGINT handler. --- laditools/application.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/laditools/application.py b/laditools/application.py index 842ddd9..571f30b 100644 --- a/laditools/application.py +++ b/laditools/application.py @@ -15,6 +15,8 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +import signal + class LadiApp(object): @property @@ -25,3 +27,9 @@ class LadiApp(object): @property def appid(self): return self._appid + + def activate(self): raise NotImplementedError + def quit(self): raise NotImplementedError + + def __init__(self): + signal.signal(signal.SIGINT, self.quit) -- 2.11.4.GIT