From a56b655bd74f9189d9db546f8b879db7374da528 Mon Sep 17 00:00:00 2001 From: Mike McLean Date: Nov 30 2017 21:23:22 +0000 Subject: deal with failed commands --- diff --git a/runtests b/runtests index 940bdf4..8d0adf9 100755 --- a/runtests +++ b/runtests @@ -17,8 +17,12 @@ def checkout_run(cmd, ref='HEAD'): """Run command in a fresh checkout of ref and return output""" tempdir = tempfile.mkdtemp() explode_ref(ref, tempdir) - output = subprocess.check_output(cmd, cwd=tempdir, - stderr=subprocess.STDOUT) + try: + output = subprocess.check_output(cmd, cwd=tempdir, + stderr=subprocess.STDOUT) + except subprocess.CalledProcessError as e: + print("Command failed with code %s" % e.returncode) + output = e.output return output