scripts: Fix encoding errors for python3

Moved call of decode('utf-8') as close as possible to
call of subprocess API to avoid calling it in a lot of
other places.

Decoded binary data to utf-8 where appropriate to fix devtool
and recipetool tests in python 3 environment.

(From OE-Core rev: 30d02e2aa2d42fdf76271234b2dc9f37bc46b250)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Ed Bartosh
2016-05-18 21:57:23 +03:00
committed by Richard Purdie
parent ed7abe6b9a
commit 3ee70cb725
5 changed files with 10 additions and 6 deletions

View File

@@ -516,7 +516,7 @@ class PythonRecipeHandler(RecipeHandler):
except (OSError, subprocess.CalledProcessError):
pass
else:
for line in dep_output.splitlines():
for line in dep_output.decode('utf-8').splitlines():
line = line.rstrip()
dep, filename = line.split('\t', 1)
if filename.endswith('/setup.py'):