1
0
mirror of https://git.yoctoproject.org/poky synced 2026-05-09 17:39:31 +00:00

engine: python3: replace iteritems() -> items()

Used items() as iteritems() doesn't exist in python 3.

(From meta-yocto rev: 0fd2e739cd14c6a02b6f4610176a0ad29b2ecc0e)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Ed Bartosh
2016-06-02 13:12:58 +03:00
committed by Richard Purdie
parent c675974680
commit 3af9f6b88f
+3 -3
View File
@@ -1385,7 +1385,7 @@ def gen_supplied_property_vals(properties, program_lines):
Generate user-specified entries for input values instead of Generate user-specified entries for input values instead of
generating input prompts. generating input prompts.
""" """
for name, val in properties.iteritems(): for name, val in properties.items():
program_line = name + " = \"" + val + "\"" program_line = name + " = \"" + val + "\""
program_lines.append(program_line) program_lines.append(program_line)
@@ -1621,7 +1621,7 @@ def print_dict(items, indent = 0):
""" """
Print the values in a possibly nested dictionary. Print the values in a possibly nested dictionary.
""" """
for key, val in items.iteritems(): for key, val in items.items():
print(" "*indent + "\"%s\" :" % key) print(" "*indent + "\"%s\" :" % key)
if type(val) == dict: if type(val) == dict:
print("{") print("{")
@@ -1654,7 +1654,7 @@ def get_properties(input_lines):
props = line.props props = line.props
item = {} item = {}
name = props["name"] name = props["name"]
for key, val in props.items(): for key, val props.items():
if not key == "name": if not key == "name":
item[key] = val item[key] = val
properties[name] = item properties[name] = item