mirror of
git://git.yoctoproject.org/poky.git
synced 2025-07-19 12:59:02 +02:00
terminal.py: Pass string instead of bytes to ExecutionError to avoid exception
Based on run() in bitbake/lib/bb/process.py, ExecutionError() expects strings not bytes. Passing bytes results in a "TypeError: Can't convert 'bytes' object to str implicitly" exception. Fixes Bug 10729 (From OE-Core rev: 063b63d4d324c23322ac1b6b7c7928e725d7b968) Signed-off-by: Martin Vuille <jpmv27@yahoo.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
2c4116d3cb
commit
b7deb1f046
|
@ -239,6 +239,8 @@ def spawn(name, sh_cmd, title=None, env=None, d=None):
|
|||
|
||||
pipe = terminal(sh_cmd, title, env, d)
|
||||
output = pipe.communicate()[0]
|
||||
if output:
|
||||
output = output.decode("utf-8")
|
||||
if pipe.returncode != 0:
|
||||
raise ExecutionError(sh_cmd, pipe.returncode, output)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user