Don’t mask exceptions when process.kill() fails.

This commit is contained in:
Michael Schwarz 2015-09-26 14:39:59 +02:00
parent 215ffeb9bb
commit ba3bc0513e

View file

@ -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: