From 52ce79dcba4c161509a6cc3ee3afe5cd6a99d53f Mon Sep 17 00:00:00 2001 From: Ed Bartosh Date: Wed, 4 May 2016 16:06:16 +0300 Subject: 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 Signed-off-by: Richard Purdie --- scripts/lib/wic/imager/baseimager.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts/lib/wic/imager/baseimager.py') diff --git a/scripts/lib/wic/imager/baseimager.py b/scripts/lib/wic/imager/baseimager.py index 760cf8a58a..557f536677 100644 --- a/scripts/lib/wic/imager/baseimager.py +++ b/scripts/lib/wic/imager/baseimager.py @@ -68,7 +68,7 @@ class BaseImageCreator(object): } # update setting from createopts - for key in createopts.keys(): + for key in createopts: if key in optmap: option = optmap[key] else: -- cgit v1.2.3-54-g00ecf