mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-21 19:30:03 +02:00
fix for catching generaltests exceptions and exiting instead of continuing
This commit is contained in:
parent
c33a8b9742
commit
3e45db2300
@ -199,14 +199,6 @@ with open(fname, 'w') as fp:
|
||||
|
||||
try:
|
||||
startGeneralTests(fp, file_results)
|
||||
except Exception as e:
|
||||
# redirect to terminal
|
||||
sys.stdout = original_stdout
|
||||
sys.stderr = original_stderr
|
||||
Log(Fore.RED, f'Exception caught with general testing. Cleaning up...')
|
||||
Log(Fore.RED, str(e))
|
||||
cleanSharedmemory(sys.stdout)
|
||||
|
||||
killAllStaleProcesses(fp)
|
||||
|
||||
for server in servers:
|
||||
@ -241,4 +233,12 @@ with open(fname, 'w') as fp:
|
||||
|
||||
break
|
||||
|
||||
except Exception as e:
|
||||
# redirect to terminal
|
||||
sys.stdout = original_stdout
|
||||
sys.stderr = original_stderr
|
||||
Log(Fore.RED, f'Exception caught with general testing. Cleaning up...')
|
||||
Log(Fore.RED, str(e))
|
||||
cleanSharedmemory(sys.stdout)
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user