mirror of
https://git.yoctoproject.org/poky
synced 2026-09-15 15:49:32 +02:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
09b9325ca2
commit
8a6c198381
@@ -246,7 +246,7 @@ def check_terminal_version(terminalName):
|
|||||||
newenv["LANG"] = "C"
|
newenv["LANG"] = "C"
|
||||||
p = sub.Popen(['sh', '-c', cmdversion], stdout=sub.PIPE, stderr=sub.PIPE, env=newenv)
|
p = sub.Popen(['sh', '-c', cmdversion], stdout=sub.PIPE, stderr=sub.PIPE, env=newenv)
|
||||||
out, err = p.communicate()
|
out, err = p.communicate()
|
||||||
ver_info = out.rstrip().split('\n')
|
ver_info = out.decode().rstrip().split('\n')
|
||||||
except OSError as exc:
|
except OSError as exc:
|
||||||
import errno
|
import errno
|
||||||
if exc.errno == errno.ENOENT:
|
if exc.errno == errno.ENOENT:
|
||||||
|
|||||||
Reference in New Issue
Block a user