aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/lib/recipetool
diff options
context:
space:
mode:
authorEd Bartosh <ed.bartosh@linux.intel.com>2016-06-02 13:12:47 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-06-02 11:45:49 +0100
commit874a269eb1d70060c2f3b3f8b70800e2aea789f4 (patch)
treecf18ec2ca7e6b04121c023499326f0057a16b82c /scripts/lib/recipetool
parent0c856653ce65403791e1e5c78229820ff794bae3 (diff)
downloadopenembedded-core-contrib-874a269eb1d70060c2f3b3f8b70800e2aea789f4.tar.gz
scripts: python3: convert iterables to lists
Converted return value of items() keys() and values() to lists when dictionary is modified in the loop and when the result is added to the list. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib/recipetool')
-rw-r--r--scripts/lib/recipetool/create_buildsys.py2
-rw-r--r--scripts/lib/recipetool/create_buildsys_python.py6
2 files changed, 4 insertions, 4 deletions
diff --git a/scripts/lib/recipetool/create_buildsys.py b/scripts/lib/recipetool/create_buildsys.py
index de3d9aed6f..78ae4bcdec 100644
--- a/scripts/lib/recipetool/create_buildsys.py
+++ b/scripts/lib/recipetool/create_buildsys.py
@@ -682,7 +682,7 @@ class AutotoolsRecipeHandler(RecipeHandler):
process_macro(in_keyword, partial)
if extravalues:
- for k,v in extravalues.items():
+ for k,v in list(extravalues.items()):
if v:
if v.startswith('$') or v.startswith('@') or v.startswith('%'):
del extravalues[k]
diff --git a/scripts/lib/recipetool/create_buildsys_python.py b/scripts/lib/recipetool/create_buildsys_python.py
index 55cce0e942..aff13cf1d2 100644
--- a/scripts/lib/recipetool/create_buildsys_python.py
+++ b/scripts/lib/recipetool/create_buildsys_python.py
@@ -361,7 +361,7 @@ class PythonRecipeHandler(RecipeHandler):
# Naive mapping of setup() arguments to PKG-INFO field names
for d in [info, non_literals]:
- for key, value in d.items():
+ for key, value in list(d.items()):
new_key = _map(key)
if new_key != key:
del d[key]
@@ -443,7 +443,7 @@ class PythonRecipeHandler(RecipeHandler):
elif new_value != value:
info[variable] = new_value
elif hasattr(value, 'items'):
- for dkey, dvalue in value.items():
+ for dkey, dvalue in list(value.items()):
new_list = []
for pos, a_value in enumerate(dvalue):
new_value = replace_value(search, replace, a_value)
@@ -608,7 +608,7 @@ def gather_setup_info(fileobj):
visitor.visit(parsed)
non_literals, extensions = {}, []
- for key, value in visitor.keywords.items():
+ for key, value in list(visitor.keywords.items()):
if key == 'ext_modules':
if isinstance(value, list):
for ext in value: