always catch KeyboardInterrupt

Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
Nico Schottelius 2011-09-19 14:38:52 +02:00
parent b4b354305c
commit de7123df79

View file

@ -772,13 +772,13 @@ def commandline():
logging.root.setLevel(logging.DEBUG)
log.debug(args)
try:
args.func(args)
except KeyboardInterrupt:
sys.exit(0)
if __name__ == "__main__":
try:
if re.match(TYPE_PREFIX, os.path.basename(sys.argv[0])):
emulator()
else:
commandline()
except KeyboardInterrupt:
sys.exit(0)