summaryrefslogtreecommitdiff
path: root/voctocore/voctocore.py
diff options
context:
space:
mode:
authorMaZderMind <github@mazdermind.de>2015-05-11 16:28:04 +0200
committerMaZderMind <github@mazdermind.de>2015-05-12 08:20:50 +0200
commitf116a33af18400cc35bd963afd3d9fac621973cf (patch)
tree420168f542fba5fd020eb9c52eec5d51dacd5c7a /voctocore/voctocore.py
parent1defb6c79aa11b6efefd83a792d582c07f2debab (diff)
quit nicely on ctrl-c
Diffstat (limited to 'voctocore/voctocore.py')
-rwxr-xr-xvoctocore/voctocore.py6
1 files changed, 4 insertions, 2 deletions
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()