helpful reporting in case of errors

This commit is contained in:
Martin Diehl 2021-02-26 06:35:42 +01:00
parent 2ca3a824a4
commit bf223e8e00
1 changed files with 3 additions and 1 deletions

View File

@ -133,6 +133,8 @@ def execute(cmd,
stdout = stdout.decode('utf-8').replace('\x08','')
stderr = stderr.decode('utf-8').replace('\x08','')
if process.returncode != 0:
print(stdout)
print(stderr)
raise RuntimeError(f"'{cmd}' failed with returncode {process.returncode}")
return stdout, stderr