From 3dbb029f18cb5d16a51be539d9289b80f5ffd55e 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) (cherry picked from commit 24dd87bd0abeb41a8cf167f7f31ed7e8e4255ea3) --- 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 15e882ceeef..811631876ed 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()