quit on ctrl+c

This commit is contained in:
Lionel Dricot 2022-02-23 10:43:46 +01:00
parent 6d87b2f4bc
commit 8c8b6763b2
1 changed files with 7 additions and 1 deletions

View File

@ -3562,7 +3562,13 @@ def main():
print("Type `help` to get the list of available command.")
for line in torun_queue:
gc.onecmd(line)
gc.cmdloop()
while True:
try:
gc.cmdloop()
except KeyboardInterrupt:
print("\n")
gc.do_quit(line)
if __name__ == '__main__':
main()