add tests for Python exec_utils

This commit is contained in:
Sarah Hoffmann
2021-01-20 09:02:45 +01:00
parent a3767f9142
commit 52b76d1d01
2 changed files with 106 additions and 1 deletions

View File

@@ -68,7 +68,10 @@ def run_api_script(endpoint, project_dir, extra_env=None, phpcgi_bin=None,
check=False)
if proc.returncode != 0 or proc.stderr:
log.error(proc.stderr.decode('utf-8').replace('\\n', '\n'))
if proc.stderr:
log.error(proc.stderr.decode('utf-8').replace('\\n', '\n'))
else:
log.error(proc.stdout.decode('utf-8').replace('\\n', '\n'))
return proc.returncode or 1
result = proc.stdout.decode('utf-8')