From 4fbcce63039697f63ce80c1af2bb34d28344bc50 Mon Sep 17 00:00:00 2001 From: fly Date: Wed, 7 Apr 2021 16:30:31 +0000 Subject: [PATCH] Catch Ctrl+D as well Signed-off-by: fly --- worldbuild-runner.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/worldbuild-runner.py b/worldbuild-runner.py index eaceeb2..dc371fc 100755 --- a/worldbuild-runner.py +++ b/worldbuild-runner.py @@ -122,7 +122,7 @@ while running: l.set_proc_count(int(match.group(2))) else: print("Invalid command. Type 'help' to see available commands") - except KeyboardInterrupt: + except (KeyboardInterrupt, EOFError): print("Please type 'quit' to exit the program") l.set_proc_count(0) @@ -135,5 +135,5 @@ while shutting_down: shutting_down = False l.stop = True l.join() - except KeyboardInterrupt: + except (KeyboardInterrupt, EOFError): print("Please wait untill all workers are done")