recipetool: fix encoding-related errors creating python recipes
cover recipetool: fix encoding-related errors creating python recipes
The following changes since commit 11063a01d4511b2688ea7ba2d7359e4e07328c66:
ruby: upgrade to 2.3.1 (2016-11-30 15:47:17 +0000)
are available in the git repository at:
git://git.openembedded.org/openembedded-core-contrib paule/recipetool-fixes7
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=paule/recipetool-fixes7
Paul Eggleton (1):
recipetool: fix encoding-related errors creating python recipes
scripts/lib/recipetool/create_buildsys_python.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Signature · 1 line
2.5.5
PATCH 1/1 recipetool: fix encoding-related errors creating python recipes
Yet another instance of us expecting a string back from subprocess when in Python 3 what you get back is bytes. Just decode the output within run_command() so we avoid this everywhere.
--- scripts/lib/recipetool/create_buildsys_python.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
scripts/lib/recipetool/create_buildsys_python.py +2 -2
@@ -512,7 +512,7 @@ class PythonRecipeHandler(RecipeHandler): except (OSError, subprocess.CalledProcessError): pass else: - for line in dep_output.decode('utf-8').splitlines(): + for line in dep_output.splitlines(): line = line.rstrip() dep, filename = line.split('\t', 1) if filename.endswith('/setup.py'):
@@ -591,7 +591,7 @@ class PythonRecipeHandler(RecipeHandler): if 'stderr' not in popenargs: popenargs['stderr'] = subprocess.STDOUT try: - return subprocess.check_output(cmd, **popenargs) + return subprocess.check_output(cmd, **popenargs).decode('utf-8') except OSError as exc: logger.error('Unable to run `{}`: {}', ' '.join(cmd), exc) raise
Signature · 1 line
2.5.5