summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>2016-06-09 07:53:06 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-06-12 23:47:17 +0100
commit8a6c198381ba238d7a2d29c02745d87c5ea30b66 (patch)
treeedf9b7cf881f567545bf6a9064fe131c9c72bbdc
parent09b9325ca2af94d54e902808ee38114955c06c16 (diff)
downloadpoky-8a6c198381ba238d7a2d29c02745d87c5ea30b66.tar.gz
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 (From OE-Core rev: b950539c911b7945d652b05616164828e711ac7f) Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/lib/oe/terminal.py2
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):
246 newenv["LANG"] = "C" 246 newenv["LANG"] = "C"
247 p = sub.Popen(['sh', '-c', cmdversion], stdout=sub.PIPE, stderr=sub.PIPE, env=newenv) 247 p = sub.Popen(['sh', '-c', cmdversion], stdout=sub.PIPE, stderr=sub.PIPE, env=newenv)
248 out, err = p.communicate() 248 out, err = p.communicate()
249 ver_info = out.rstrip().split('\n') 249 ver_info = out.decode().rstrip().split('\n')
250 except OSError as exc: 250 except OSError as exc:
251 import errno 251 import errno
252 if exc.errno == errno.ENOENT: 252 if exc.errno == errno.ENOENT: