diff options
author | MaZderMind <github@mazdermind.de> | 2015-05-11 16:28:04 +0200 |
---|---|---|
committer | MaZderMind <github@mazdermind.de> | 2015-05-12 08:20:50 +0200 |
commit | f116a33af18400cc35bd963afd3d9fac621973cf (patch) | |
tree | 420168f542fba5fd020eb9c52eec5d51dacd5c7a /voctocore | |
parent | 1defb6c79aa11b6efefd83a792d582c07f2debab (diff) |
quit nicely on ctrl-c
Diffstat (limited to 'voctocore')
-rwxr-xr-x | voctocore/voctocore.py | 6 |
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() |