]> git.sur5r.net Git - u-boot/commitdiff
patman: Use items() to iterate over dictionaries
authorPaul Burton <paul.burton@imgtec.com>
Tue, 27 Sep 2016 15:03:54 +0000 (16:03 +0100)
committersjg <sjg@chromium.org>
Sun, 9 Oct 2016 15:30:32 +0000 (09:30 -0600)
In python 3.x the iteritems() method has been removed from dictionaries,
and the items() method does effectively the same thing. On python 2.x
using items() is a little less efficient since it involves copying data,
but as speed isn't a concern in this code switch to using items() anyway
for simplicity.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Acked-by: Simon Glass <sjg@chromium.org>
tools/patman/settings.py

index 3caf37935820fd6eaa8bfbc9b6b7ec9d202749c1..7ef0ab0a31fc6a9944bd5230d865cbd82f17c30f 100644 (file)
@@ -94,7 +94,7 @@ class _ProjectConfigParser(ConfigParser.SafeConfigParser):
         if not self.has_section(project_settings):
             self.add_section(project_settings)
         project_defaults = _default_settings.get(project_name, {})
-        for setting_name, setting_value in project_defaults.iteritems():
+        for setting_name, setting_value in project_defaults.items():
             self.set(project_settings, setting_name, setting_value)
 
     def get(self, section, option, *args, **kwargs):