1
0
mirror of https://git.yoctoproject.org/poky synced 2026-05-30 00:20:08 +00:00

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>
This commit is contained in:
Ed Bartosh
2016-05-04 16:06:16 +03:00
committed by Richard Purdie
parent e36d04abb7
commit 52ce79dcba
3 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -137,7 +137,7 @@ class PluginMgr(object):
return_methods = None
for _source_name, klass in self.get_plugins('source').items():
if _source_name == source_name:
for _method_name in methods.keys():
for _method_name in methods:
if not hasattr(klass, _method_name):
msger.warning("Unimplemented %s source interface for: %s"\
% (_method_name, _source_name))