summaryrefslogtreecommitdiffstats
path: root/meta/lib/oe/recipeutils.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2016-05-20 11:53:11 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-06-02 08:10:02 +0100
commitcaebd862bac7eed725e0f0321bf50793671b5312 (patch)
tree2da96b5da7b9b0e0ef04c03cf74f14ddfd180f30 /meta/lib/oe/recipeutils.py
parent2476bdcbef591e951d11d57d53f1315848758571 (diff)
downloadopenembedded-core-contrib-caebd862bac7eed725e0f0321bf50793671b5312.tar.gz
classes/lib: Update to explictly create lists where needed
Iterators now return views, not lists in python3. Where we need lists, handle this explicitly. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oe/recipeutils.py')
-rw-r--r--meta/lib/oe/recipeutils.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/meta/lib/oe/recipeutils.py b/meta/lib/oe/recipeutils.py
index b437720fe7..146fe83e18 100644
--- a/meta/lib/oe/recipeutils.py
+++ b/meta/lib/oe/recipeutils.py
@@ -692,7 +692,7 @@ def bbappend_recipe(rd, destlayerdir, srcfiles, install=None, wildcardver=False,
varnames = [item[0] for item in bbappendlines]
if removevalues:
- varnames.extend(removevalues.keys())
+ varnames.extend(list(removevalues.keys()))
with open(appendpath, 'r') as f:
(updated, newlines) = bb.utils.edit_metadata(f, varnames, appendfile_varfunc)
@@ -743,12 +743,12 @@ def replace_dir_vars(path, d):
"""Replace common directory paths with appropriate variable references (e.g. /etc becomes ${sysconfdir})"""
dirvars = {}
# Sort by length so we get the variables we're interested in first
- for var in sorted(d.keys(), key=len):
+ for var in sorted(list(d.keys()), key=len):
if var.endswith('dir') and var.lower() == var:
value = d.getVar(var, True)
if value.startswith('/') and not '\n' in value and value not in dirvars:
dirvars[value] = var
- for dirpath in sorted(dirvars.keys(), reverse=True):
+ for dirpath in sorted(list(dirvars.keys()), reverse=True):
path = path.replace(dirpath, '${%s}' % dirvars[dirpath])
return path