summaryrefslogtreecommitdiffstats
path: root/scripts/lib/wic/plugin.py
diff options
context:
space:
mode:
authorEd Bartosh <ed.bartosh@linux.intel.com>2016-05-04 16:06:16 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-05-14 23:05:13 +0100
commit52ce79dcba4c161509a6cc3ee3afe5cd6a99d53f (patch)
tree305ca59109812b075e8eda7f637c60276ee51517 /scripts/lib/wic/plugin.py
parente36d04abb724002be015e7ea0f776b0d326c9dcb (diff)
downloadpoky-52ce79dcba4c161509a6cc3ee3afe5cd6a99d53f.tar.gz
wic: don't use dict.keys and dict.has_key
Replaced calls of dict.keys and dict.has_key methods with the 'key in dict' statement. 'key in dict' is more pythonic, faster and readable. dict.has_key doesn't exist in Python 3. [YOCTO #9412] (From OE-Core rev: 003df7dfb932c551953fbf1bd769b3c31bd16fb4) 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.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/lib/wic/plugin.py b/scripts/lib/wic/plugin.py
index 80c609cf8c..933647d7c7 100644
--- a/scripts/lib/wic/plugin.py
+++ b/scripts/lib/wic/plugin.py
@@ -137,7 +137,7 @@ class PluginMgr(object):
137 return_methods = None 137 return_methods = None
138 for _source_name, klass in self.get_plugins('source').items(): 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:
141 if not hasattr(klass, _method_name): 141 if not hasattr(klass, _method_name):
142 msger.warning("Unimplemented %s source interface for: %s"\ 142 msger.warning("Unimplemented %s source interface for: %s"\
143 % (_method_name, _source_name)) 143 % (_method_name, _source_name))