diff --git a/devlib/utils/misc.py b/devlib/utils/misc.py index 85230f0..2e29f69 100644 --- a/devlib/utils/misc.py +++ b/devlib/utils/misc.py @@ -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]))