[oe-commits] [openembedded-core] 13/39: recipetool: fix encoding-related errors creating python recipes
git at git.openembedded.org
git at git.openembedded.org
Thu Dec 8 10:33:11 UTC 2016
rpurdie pushed a commit to branch master
in repository openembedded-core.
commit 103faae78cdff5280c7b7cdb7ca01e0868d02ec9
Author: Paul Eggleton <paul.eggleton at linux.intel.com>
AuthorDate: Mon Dec 5 11:11:44 2016 +1300
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.
Signed-off-by: Paul Eggleton <paul.eggleton at linux.intel.com>
Signed-off-by: Ross Burton <ross.burton at intel.com>
---
scripts/lib/recipetool/create_buildsys_python.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/scripts/lib/recipetool/create_buildsys_python.py b/scripts/lib/recipetool/create_buildsys_python.py
index e41d81a..82a2be1 100644
--- a/scripts/lib/recipetool/create_buildsys_python.py
+++ b/scripts/lib/recipetool/create_buildsys_python.py
@@ -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
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list