Fix in safe_execute_python to raise WindowsError if process die during execution

This commit is contained in:
hakril
2018-12-21 18:53:55 +01:00
parent a194f0be6b
commit 771593f17d
+1 -1
View File
@@ -374,7 +374,7 @@ def safe_execute_python(process, code):
t.wait() # Wait terminaison of the thread
if t.exit_code == 0:
return True
if t.exit_code == STATUS_THREAD_IS_TERMINATING:
if t.exit_code == STATUS_THREAD_IS_TERMINATING or process.is_exit:
raise WindowsError("{0} died during execution of python command".format(process))
if t.exit_code != 0xffffffff:
raise ValueError("Unknown exit code {0}".format(hex(t.exit_code)))