mirror of
https://github.com/ARM-software/devlib.git
synced 2025-01-31 02:00:45 +00:00
utils/check_subprocess_output: Fix std error output
Fix stderr output being dropped unless there there is also output on stdout.
This commit is contained in:
parent
8f3200679c
commit
822c50273f
@ -189,7 +189,7 @@ def check_subprocess_output(process, timeout=None, ignore=None, inputtext=None):
|
|||||||
|
|
||||||
# Currently errors=replace is needed as 0x8c throws an error
|
# Currently errors=replace is needed as 0x8c throws an error
|
||||||
output = output.decode(sys.stdout.encoding or 'utf-8', "replace") if output else ''
|
output = output.decode(sys.stdout.encoding or 'utf-8', "replace") if output else ''
|
||||||
error = error.decode(sys.stderr.encoding or 'utf-8', "replace") if output else ''
|
error = error.decode(sys.stderr.encoding or 'utf-8', "replace") if error else ''
|
||||||
|
|
||||||
if timeout_expired:
|
if timeout_expired:
|
||||||
raise TimeoutError(process.args, output='\n'.join([output, error]))
|
raise TimeoutError(process.args, output='\n'.join([output, error]))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user