From eadebec0014575b07515e0e65b06c490f214d35a Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Sun, 4 Jun 2017 15:51:09 -0400 Subject: Refs #3646 -- include stdout in the output when spawning a process fails in the release script (#3671) --- release.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'release.py') diff --git a/release.py b/release.py index e7a0080b..0016b659 100644 --- a/release.py +++ b/release.py @@ -25,7 +25,12 @@ JENKINS_URL = ( def run(*args, **kwargs): kwargs.setdefault("stderr", subprocess.STDOUT) - subprocess.check_output(list(args), **kwargs) + try: + subprocess.check_output(list(args), **kwargs) + except subprocess.CalledProcessError as e: + # Reraise this with a different type so that str(e) is somethign with + # stdout in it. + raise Exception(e.cmd, e.returncode, e.output) def wait_for_build_completed(session): -- cgit v1.2.3