diff options
| author | Martin Vuille <jpmv27@yahoo.com> | 2016-11-27 15:02:37 -0500 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-01-11 17:21:43 +0000 |
| commit | 926f3dfe2dfe98e220b1709e57982c7aa154b5ae (patch) | |
| tree | 3e30353acb36549065c4f429a96274a34911c100 /meta/lib | |
| parent | 40734384918a730ed684ecada93f00f3bca6c47f (diff) | |
| download | poky-926f3dfe2dfe98e220b1709e57982c7aa154b5ae.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)
(From OE-Core rev: df4d5246d47acc54aa322b777364c9b86f9a4c54)
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>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
| -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 3901ad3f26..3c8ef59a45 100644 --- a/meta/lib/oe/terminal.py +++ b/meta/lib/oe/terminal.py | |||
| @@ -227,6 +227,8 @@ def spawn(name, sh_cmd, title=None, env=None, d=None): | |||
| 227 | 227 | ||
| 228 | pipe = terminal(sh_cmd, title, env, d) | 228 | pipe = terminal(sh_cmd, title, env, d) |
| 229 | output = pipe.communicate()[0] | 229 | output = pipe.communicate()[0] |
| 230 | if output: | ||
| 231 | output = output.decode("utf-8") | ||
| 230 | if pipe.returncode != 0: | 232 | if pipe.returncode != 0: |
| 231 | raise ExecutionError(sh_cmd, pipe.returncode, output) | 233 | raise ExecutionError(sh_cmd, pipe.returncode, output) |
| 232 | 234 | ||
