[oe-commits] [openembedded-core] 21/47: lib/oe/terminal.py: decode bytes variable before rstrip/split
git at git.openembedded.org
git at git.openembedded.org
Sun Jun 12 22:48:03 UTC 2016
rpurdie pushed a commit to branch master
in repository openembedded-core.
commit b950539c911b7945d652b05616164828e711ac7f
Author: Leonardo Sandoval <leonardo.sandoval.gonzalez at linux.intel.com>
AuthorDate: Thu Jun 9 07:53:06 2016 -0500
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 at linux.intel.com>
Signed-off-by: Ross Burton <ross.burton at intel.com>
---
meta/lib/oe/terminal.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta/lib/oe/terminal.py b/meta/lib/oe/terminal.py
index dc25d14..7f4458e 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:
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list