summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Schwarz <michi.schwarz@gmail.com>2015-09-26 14:39:59 +0200
committerMichael Schwarz <michi.schwarz@gmail.com>2015-10-02 00:26:00 +0200
commitba3bc0513ebf278d9570d9db5f95b93bad4f0706 (patch)
tree4eaf1432e6b9c8632bf6127403175eb0102406be
parent215ffeb9bbda413372d49bb9e6c958ec1de221d2 (diff)
downloadpogojig-ba3bc0513ebf278d9570d9db5f95b93bad4f0706.tar.gz
pogojig-ba3bc0513ebf278d9570d9db5f95b93bad4f0706.tar.bz2
pogojig-ba3bc0513ebf278d9570d9db5f95b93bad4f0706.zip
Don’t mask exceptions when process.kill() fails.
-rw-r--r--support/lib/util.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/support/lib/util.py b/support/lib/util.py
index aea9835..d88f9f6 100644
--- a/support/lib/util.py
+++ b/support/lib/util.py
@@ -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: