Skip to content

Commit 771593f

Browse files
committed
Fix in safe_execute_python to raise WindowsError if process die during execution
1 parent a194f0b commit 771593f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

windows/injection.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ def safe_execute_python(process, code):
374374
t.wait() # Wait terminaison of the thread
375375
if t.exit_code == 0:
376376
return True
377-
if t.exit_code == STATUS_THREAD_IS_TERMINATING:
377+
if t.exit_code == STATUS_THREAD_IS_TERMINATING or process.is_exit:
378378
raise WindowsError("{0} died during execution of python command".format(process))
379379
if t.exit_code != 0xffffffff:
380380
raise ValueError("Unknown exit code {0}".format(hex(t.exit_code)))

0 commit comments

Comments
 (0)