diff options
author | Martin Vuille <jpmv27@yahoo.com> | 2016-11-27 15:02:37 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-11-30 15:48:08 +0000 |
commit | b7deb1f046fc4f5ae2c1e1b3be0dce9b131c2f28 (patch) | |
tree | c84897fa43037dabe38edb11d8ac3c4cf34c3aa6 /meta | |
parent | 2c4116d3cbeac12b0c9d0fc6da9592eb3b8dce3b (diff) | |
download | poky-b7deb1f046fc4f5ae2c1e1b3be0dce9b131c2f28.tar.gz |
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>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/lib/oe/terminal.py | 2 |
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): | |||
239 | 239 | ||
240 | pipe = terminal(sh_cmd, title, env, d) | 240 | pipe = terminal(sh_cmd, title, env, d) |
241 | output = pipe.communicate()[0] | 241 | output = pipe.communicate()[0] |
242 | if output: | ||
243 | output = output.decode("utf-8") | ||
242 | if pipe.returncode != 0: | 244 | if pipe.returncode != 0: |
243 | raise ExecutionError(sh_cmd, pipe.returncode, output) | 245 | raise ExecutionError(sh_cmd, pipe.returncode, output) |
244 | 246 | ||