diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2016-12-05 11:11:44 +1300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-01-11 11:46:47 +0000 |
commit | f9e0267a64069fa2488ceb7ca1f6dbe5bfb66c18 (patch) | |
tree | 658aec52e422701f8b1c225bcf542a3356551501 /scripts | |
parent | ba7cfc296b07fe62d46a6c143d9a7d344de9f446 (diff) | |
download | openembedded-core-f9e0267a64069fa2488ceb7ca1f6dbe5bfb66c18.tar.gz openembedded-core-f9e0267a64069fa2488ceb7ca1f6dbe5bfb66c18.tar.bz2 openembedded-core-f9e0267a64069fa2488ceb7ca1f6dbe5bfb66c18.zip |
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.
(From OE-Core rev: 103faae78cdff5280c7b7cdb7ca01e0868d02ec9)
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/lib/recipetool/create_buildsys_python.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/lib/recipetool/create_buildsys_python.py b/scripts/lib/recipetool/create_buildsys_python.py index e41d81a317..82a2be1224 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 |