From 26d9d962c0dbdf976708f39c285100b984e85b4f Mon Sep 17 00:00:00 2001 From: Arthur Lu Date: Wed, 13 Oct 2021 22:32:42 +0000 Subject: [PATCH] added close_all when exiting due to error Former-commit-id: 9b614af85c93842f5a7f5882bd5337d8c6891b4f --- src/cli/superscript.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/cli/superscript.py b/src/cli/superscript.py index b3610c8..0ef3395 100644 --- a/src/cli/superscript.py +++ b/src/cli/superscript.py @@ -252,6 +252,7 @@ def main(send, verbose = False, profile = False, debug = False): if load_config(config_path, config): send(stderr, ERR, "could not find config at <" + config_path + ">, generating blank config and exiting", code = 100) + close_all() exit_code = 1 break @@ -260,6 +261,7 @@ def main(send, verbose = False, profile = False, debug = False): flag, apikey, tbakey, preference, sync = parse_config_persistent(send, config) if flag: exit_code = 1 + close_all() break send(stdout, INF, "found and loaded database and tba keys") @@ -271,10 +273,12 @@ def main(send, verbose = False, profile = False, debug = False): resolve_config_conflicts(send, client, config, preference, sync) if config == 1: exit_code = 1 + close_all() break flag, exec_threads, competition, match_tests, metrics_tests, pit_tests = parse_config_variable(send, config) if flag: exit_code = 1 + close_all() break start = time.time()