Ensure the code is still compatible with py2 where it currently runs
Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>
This commit is contained in:
parent
f68e63f8da
commit
5926dd9ee6
1 changed files with 4 additions and 2 deletions
|
@ -32,8 +32,10 @@ def run_command(command, cwd=None):
|
|||
output = subprocess.check_output(command, cwd=cwd, stderr=subprocess.PIPE)
|
||||
except subprocess.CalledProcessError as e:
|
||||
_log.error("Command `%s` return code: `%s`", " ".join(command), e.returncode)
|
||||
_log.error("stdout:\n-------\n%s", e.stdout)
|
||||
_log.error("stderr:\n-------\n%s", e.stderr)
|
||||
_log.error("Output:\n------\n%s", e.output)
|
||||
# To enable when we move to python3
|
||||
# _log.error("stdout:\n-------\n%s", e.stdout)
|
||||
# _log.error("stderr:\n-------\n%s", e.stderr)
|
||||
raise
|
||||
|
||||
return output
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue