mirror of
https://git.yoctoproject.org/poky
synced 2026-04-21 21:32:12 +02:00
scripts: python3: decode subprocess output
stdeout and stderr content returned by subprocess API has different types in Python 3(bytes) and Python 2(string). Decoding it to 'utf-8' makes it unicode on both pythons. (From OE-Core rev: ae4d36375683b6cfd48af25bfca70b2e77f7ade5) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
a8314b9531
commit
4e36eeee77
@@ -198,7 +198,7 @@ def runcmd(cmd,destdir=None,printerr=True,out=None,env=None):
|
||||
raise e
|
||||
|
||||
err.seek(0)
|
||||
output = err.read()
|
||||
output = err.read().decode('utf-8')
|
||||
logger.debug("output: %s" % output.replace(chr(0), '\\0'))
|
||||
return output
|
||||
|
||||
|
||||
Reference in New Issue
Block a user