diff options
author | Ed Bartosh <ed.bartosh@linux.intel.com> | 2016-05-10 15:28:50 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-06-01 15:28:23 +0100 |
commit | 752ea00919ef054622a51ce097923309934eff2b (patch) | |
tree | 69f95582c82770a7e8664e90b5d75ed3cd64601f /lib/toaster/bldcontrol | |
parent | 46f185afaaef74c566eec6d8fc1edc68a3b96b32 (diff) | |
download | bitbake-752ea00919ef054622a51ce097923309934eff2b.tar.gz |
toaster: use decode('utf-8') for binary data
Decoded binary data to utf-8 to fix the following
error when runnign on python 3:
TypeError: Type str doesn't support the buffer API
[YOCTO #9584]
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/toaster/bldcontrol')
-rw-r--r-- | lib/toaster/bldcontrol/localhostbecontroller.py | 2 | ||||
-rw-r--r-- | lib/toaster/bldcontrol/management/commands/loadconf.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/toaster/bldcontrol/localhostbecontroller.py b/lib/toaster/bldcontrol/localhostbecontroller.py index b4e41968f..3da8be435 100644 --- a/lib/toaster/bldcontrol/localhostbecontroller.py +++ b/lib/toaster/bldcontrol/localhostbecontroller.py @@ -70,7 +70,7 @@ class LocalhostBEController(BuildEnvironmentController): raise ShellCmdException(err) else: logger.debug("localhostbecontroller: shellcmd success") - return out + return out.decode('utf-8') def getGitCloneDirectory(self, url, branch): """Construct unique clone directory name out of url and branch.""" diff --git a/lib/toaster/bldcontrol/management/commands/loadconf.py b/lib/toaster/bldcontrol/management/commands/loadconf.py index 6d25df9e5..173e3ce57 100644 --- a/lib/toaster/bldcontrol/management/commands/loadconf.py +++ b/lib/toaster/bldcontrol/management/commands/loadconf.py @@ -54,7 +54,7 @@ class Command(BaseCommand): (out,err) = cmd.communicate() if cmd.returncode != 0: logging.warning("Error while importing layer vcs_url: git error: %s" % err) - for line in out.split("\n"): + for line in out.decode('utf-8').split("\n"): try: (name, path) = line.split("\t", 1) if name == remote_name: |