properly handle ^C in console

This commit is contained in:
Daniel Pavel 2013-06-22 21:32:19 +02:00
parent be80ba3b3b
commit 7102229937
1 changed files with 3 additions and 0 deletions

View File

@ -62,6 +62,9 @@ def main():
from . import appinstance
appid = appinstance.check()
try:
# handle ^C in console
import signal
signal.signal(signal.SIGINT, signal.SIG_DFL)
_run(args)
finally:
appinstance.close(appid)