added close_all when exiting due to error

Former-commit-id: 9b614af85c
This commit is contained in:
Arthur Lu 2021-10-13 22:32:42 +00:00
parent e20a212bd9
commit 26d9d962c0

View File

@ -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()