Don’t mask exceptions when process.kill() fails.
This commit is contained in:
parent
215ffeb9bb
commit
ba3bc0513e
1 changed files with 5 additions and 1 deletions
|
|
@ -80,7 +80,11 @@ def command_context(args, remove_env = [], set_env = { }, working_dir = None, us
|
|||
try:
|
||||
yield process
|
||||
except:
|
||||
process.kill()
|
||||
try:
|
||||
process.kill()
|
||||
except OSError:
|
||||
# Ignore exceptions here so we don't mask the already-being-thrown exception.
|
||||
pass
|
||||
|
||||
raise
|
||||
finally:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue