From f116a33af18400cc35bd963afd3d9fac621973cf Mon Sep 17 00:00:00 2001 From: MaZderMind Date: Mon, 11 May 2015 16:28:04 +0200 Subject: quit nicely on ctrl-c --- voctocore/voctocore.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'voctocore') diff --git a/voctocore/voctocore.py b/voctocore/voctocore.py index 7a96277..43826d1 100755 --- a/voctocore/voctocore.py +++ b/voctocore/voctocore.py @@ -44,11 +44,13 @@ class Voctocore(object): def run(self): self.log.info('running GObject-MainLoop') - self.mainloop.run() + try: + self.mainloop.run() + except KeyboardInterrupt: + self.log.info('Terminated via Ctrl-C') def quit(self): self.log.info('quitting GObject-MainLoop') - self.mainloop.quit() -- cgit v1.2.3