Handle KeyboardInterrupt

This commit is contained in:
Bridget
2020-04-12 22:13:48 +02:00
parent c12df307c3
commit 7a74ca52e8

View File

@@ -84,6 +84,9 @@ class Shell(cmd.Cmd):
def run():
shell = Shell()
shell.cmdloop()
try:
shell.cmdloop()
except KeyboardInterrupt:
shell.do_exit(None)
run()