From 24dd87bd0abeb41a8cf167f7f31ed7e8e4255ea3 Mon Sep 17 00:00:00 2001 From: Dag Wieers Date: Thu, 20 Sep 2018 19:14:11 +0200 Subject: [PATCH] Fix incorrect use of subprocess.CalledProcessError (#45890) --- test/sanity/code-smell/docs-build.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/sanity/code-smell/docs-build.py b/test/sanity/code-smell/docs-build.py index 362c74ad44e..f750572d6d5 100755 --- a/test/sanity/code-smell/docs-build.py +++ b/test/sanity/code-smell/docs-build.py @@ -14,7 +14,10 @@ def main(): stdout, stderr = sphinx.communicate() if sphinx.returncode != 0: - raise subprocess.CalledProcessError(sphinx.returncode, cmd, output=stdout, stderr=stderr) + print("Command '%s' failed with status code: %d" % (' '.join(cmd), sphinx.returncode)) + print(stdout) + print(stderr) + return with open('docs/docsite/rst_warnings', 'r') as warnings_fd: output = warnings_fd.read().strip()