Commit f1d4da7b authored by Henrique Nakashima's avatar Henrique Nakashima Committed by Commit Bot

[Lorenz] Print stderr of when subprocess fails during graph generation

e.output only includes stdout. Some errors are shown in stdout and
others in stderr, so print both.

Bug: 1111056
Change-Id: Ie83c070c726f62771eb6fc0750b60568f5dc0a48
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2366663
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: default avatarMohamed Heikal <mheikal@chromium.org>
Cr-Commit-Position: refs/heads/master@{#800583}
parent 56819ee9
......@@ -98,7 +98,9 @@ def _run_command(command: List[str]) -> str:
text=True,
check=True)
except subprocess.CalledProcessError as e:
print(f'{command} failed with error:\n{e.output}', file=sys.stderr)
print(f'{command} failed with code {e.returncode}.', file=sys.stderr)
print(f'\nSTDERR:\n{e.stderr}', file=sys.stderr)
print(f'\nSTDOUT:\n{e.stdout}', file=sys.stderr)
raise
return run_result.stdout
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment