diff options
author | Ed Bartosh <ed.bartosh@linux.intel.com> | 2016-06-02 13:12:47 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-06-03 13:13:28 +0100 |
commit | 07c97db27288cf806900b13e55fe37e4bf22e889 (patch) | |
tree | bf116c101f365c8dc438b72aa9499feabea2ef66 /scripts/lib/recipetool/create_buildsys_python.py | |
parent | 1132970f0e1a9e9a2135549b8512f58af80aa5c4 (diff) | |
download | poky-07c97db27288cf806900b13e55fe37e4bf22e889.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.
(From OE-Core rev: 874a269eb1d70060c2f3b3f8b70800e2aea789f4)
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/create_buildsys_python.py')
-rw-r--r-- | scripts/lib/recipetool/create_buildsys_python.py | 6 |
1 files changed, 3 insertions, 3 deletions
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): | |||
361 | 361 | ||
362 | # Naive mapping of setup() arguments to PKG-INFO field names | 362 | # Naive mapping of setup() arguments to PKG-INFO field names |
363 | for d in [info, non_literals]: | 363 | for d in [info, non_literals]: |
364 | for key, value in d.items(): | 364 | for key, value in list(d.items()): |
365 | new_key = _map(key) | 365 | new_key = _map(key) |
366 | if new_key != key: | 366 | if new_key != key: |
367 | del d[key] | 367 | del d[key] |
@@ -443,7 +443,7 @@ class PythonRecipeHandler(RecipeHandler): | |||
443 | elif new_value != value: | 443 | elif new_value != value: |
444 | info[variable] = new_value | 444 | info[variable] = new_value |
445 | elif hasattr(value, 'items'): | 445 | elif hasattr(value, 'items'): |
446 | for dkey, dvalue in value.items(): | 446 | for dkey, dvalue in list(value.items()): |
447 | new_list = [] | 447 | new_list = [] |
448 | for pos, a_value in enumerate(dvalue): | 448 | for pos, a_value in enumerate(dvalue): |
449 | new_value = replace_value(search, replace, a_value) | 449 | new_value = replace_value(search, replace, a_value) |
@@ -608,7 +608,7 @@ def gather_setup_info(fileobj): | |||
608 | visitor.visit(parsed) | 608 | visitor.visit(parsed) |
609 | 609 | ||
610 | non_literals, extensions = {}, [] | 610 | non_literals, extensions = {}, [] |
611 | for key, value in visitor.keywords.items(): | 611 | for key, value in list(visitor.keywords.items()): |
612 | if key == 'ext_modules': | 612 | if key == 'ext_modules': |
613 | if isinstance(value, list): | 613 | if isinstance(value, list): |
614 | for ext in value: | 614 | for ext in value: |