From ba3bc0513ebf278d9570d9db5f95b93bad4f0706 Mon Sep 17 00:00:00 2001 From: Michael Schwarz Date: Sat, 26 Sep 2015 14:39:59 +0200 Subject: Don’t mask exceptions when process.kill() fails. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- support/lib/util.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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: -- cgit