From 5f75cf834725ac26b289cc5f157af0cb71cd5f0e Mon Sep 17 00:00:00 2001 From: Scott Date: Thu, 6 Jan 2022 12:13:34 -0800 Subject: A bunch of changes... --- remote_worker.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'remote_worker.py') diff --git a/remote_worker.py b/remote_worker.py index c04ac65..0086c40 100755 --- a/remote_worker.py +++ b/remote_worker.py @@ -83,6 +83,7 @@ def main() -> None: in_file = config.config['code_file'] out_file = config.config['result_file'] + stop_thread = None if config.config['watch_for_cancel']: (thread, stop_thread) = watch_for_cancel() @@ -130,8 +131,9 @@ def main() -> None: stop_thread.set() sys.exit(-1) - stop_thread.set() - thread.join() + if stop_thread is not None: + stop_thread.set() + thread.join() if __name__ == '__main__': -- cgit v1.3