summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Vuille <jpmv27@yahoo.com>2016-11-27 15:02:37 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-11-30 15:47:15 +0000
commit063b63d4d324c23322ac1b6b7c7928e725d7b968 (patch)
tree981bfff98b4ce586fdda171ecc6dd1ec9673c46b
parent58bf0a237ca28459eb8c3afa030c0054f5bc1f16 (diff)
downloadopenembedded-core-contrib-063b63d4d324c23322ac1b6b7c7928e725d7b968.tar.gz
openembedded-core-contrib-063b63d4d324c23322ac1b6b7c7928e725d7b968.tar.bz2
openembedded-core-contrib-063b63d4d324c23322ac1b6b7c7928e725d7b968.zip
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 Signed-off-by: Martin Vuille <jpmv27@yahoo.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
-rw-r--r--meta/lib/oe/terminal.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/meta/lib/oe/terminal.py b/meta/lib/oe/terminal.py
index 38e66cef1f..a89fa45691 100644
--- a/meta/lib/oe/terminal.py
+++ b/meta/lib/oe/terminal.py
@@ -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)