1
0
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:
Marc Bonnici 2020-11-06 16:29:25 +00:00 committed by setrofim
parent 8f3200679c
commit 822c50273f

View File

@ -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
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:
raise TimeoutError(process.args, output='\n'.join([output, error]))