diff options
author | Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> | 2016-06-09 07:53:06 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-06-12 23:39:21 +0100 |
commit | b950539c911b7945d652b05616164828e711ac7f (patch) | |
tree | 0d809a02938582c07d628d47dc35c2d1cd751ef7 /meta | |
parent | 991174af2dd3905b8d11022a8ff05b2df90ad8d3 (diff) | |
download | openembedded-core-b950539c911b7945d652b05616164828e711ac7f.tar.gz openembedded-core-b950539c911b7945d652b05616164828e711ac7f.tar.bz2 openembedded-core-b950539c911b7945d652b05616164828e711ac7f.zip |
lib/oe/terminal.py: decode bytes variable before rstrip/split
On python 3, bytes variable types must be decoded if these are intended to be
used as strings, otherwise we get the following error exception:
TypeError: Type str doesn't support the buffer API
Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/lib/oe/terminal.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/lib/oe/terminal.py b/meta/lib/oe/terminal.py index dc25d14ff6..7f4458ea33 100644 --- a/meta/lib/oe/terminal.py +++ b/meta/lib/oe/terminal.py @@ -246,7 +246,7 @@ def check_terminal_version(terminalName): newenv["LANG"] = "C" p = sub.Popen(['sh', '-c', cmdversion], stdout=sub.PIPE, stderr=sub.PIPE, env=newenv) out, err = p.communicate() - ver_info = out.rstrip().split('\n') + ver_info = out.decode().rstrip().split('\n') except OSError as exc: import errno if exc.errno == errno.ENOENT: |