diff options
author | Ed Bartosh <ed.bartosh@linux.intel.com> | 2016-05-04 16:06:15 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-05-14 23:05:13 +0100 |
commit | e36d04abb724002be015e7ea0f776b0d326c9dcb (patch) | |
tree | 7682ca0b2185c87132d3630ab16f55cbd167d8bb /scripts/lib/wic/plugin.py | |
parent | 0c57dd96c85612e2c616966ae21fcbbb11bdc066 (diff) | |
download | poky-e36d04abb724002be015e7ea0f776b0d326c9dcb.tar.gz |
wic: use items instead of iteritems
Dictionary method 'iteritems' doesn't exist in Python 3.
Replaced 'iteritems' with 'items' to be able to run the
code under both Python 3 and Python 2.
[YOCTO #9412]
(From OE-Core rev: 5b14eb8d68aaca82de4f8f6bcb28ad6f4a5125d0)
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib/wic/plugin.py')
-rw-r--r-- | scripts/lib/wic/plugin.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/lib/wic/plugin.py b/scripts/lib/wic/plugin.py index ccfdfcb934..80c609cf8c 100644 --- a/scripts/lib/wic/plugin.py +++ b/scripts/lib/wic/plugin.py | |||
@@ -81,7 +81,7 @@ class PluginMgr(object): | |||
81 | # the value True/False means "loaded" | 81 | # the value True/False means "loaded" |
82 | 82 | ||
83 | def _load_all(self): | 83 | def _load_all(self): |
84 | for (pdir, loaded) in self.plugin_dirs.iteritems(): | 84 | for (pdir, loaded) in self.plugin_dirs.items(): |
85 | if loaded: | 85 | if loaded: |
86 | continue | 86 | continue |
87 | 87 | ||
@@ -135,7 +135,7 @@ class PluginMgr(object): | |||
135 | None is returned. | 135 | None is returned. |
136 | """ | 136 | """ |
137 | return_methods = None | 137 | return_methods = None |
138 | for _source_name, klass in self.get_plugins('source').iteritems(): | 138 | for _source_name, klass in self.get_plugins('source').items(): |
139 | if _source_name == source_name: | 139 | if _source_name == source_name: |
140 | for _method_name in methods.keys(): | 140 | for _method_name in methods.keys(): |
141 | if not hasattr(klass, _method_name): | 141 | if not hasattr(klass, _method_name): |