mirror of
https://github.com/certbot/certbot.git
synced 2026-08-01 18:56:55 +02:00
Print script output in case of a failure. (#7759)
These tests failed at https://travis-ci.com/certbot/certbot/jobs/285202481 but do not include any output from the script about what went wrong because the string created from `subprocess.CalledProcessError` does not include value of output. This PR fixes that by printing these values which `pytest` will include in the output if the test fails.
This commit is contained in:
@@ -167,6 +167,10 @@ def out_and_err(command, input=None, shell=False, env=None):
|
|||||||
if status:
|
if status:
|
||||||
error = CalledProcessError(status, command)
|
error = CalledProcessError(status, command)
|
||||||
error.output = out
|
error.output = out
|
||||||
|
print('stdout output was:')
|
||||||
|
print(out)
|
||||||
|
print('stderr output was:')
|
||||||
|
print(err)
|
||||||
raise error
|
raise error
|
||||||
return out, err
|
return out, err
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user