[gnome-continuous-yocto/gnomeostree-3.28-rocko: 283/8267] wic: use items instead of iteritems



commit e36d04abb724002be015e7ea0f776b0d326c9dcb
Author: Ed Bartosh <ed bartosh linux intel com>
Date:   Wed May 4 16:06:15 2016 +0300

    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>

 scripts/lib/wic/conf.py    |    2 +-
 scripts/lib/wic/creator.py |    2 +-
 scripts/lib/wic/help.py    |    2 +-
 scripts/lib/wic/plugin.py  |    4 ++--
 4 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/scripts/lib/wic/conf.py b/scripts/lib/wic/conf.py
index f7d56d0..070ec30 100644
--- a/scripts/lib/wic/conf.py
+++ b/scripts/lib/wic/conf.py
@@ -70,7 +70,7 @@ class ConfigMgr(object):
         self.create = {}
 
         # initialize the values with defaults
-        for sec, vals in self.DEFAULTS.iteritems():
+        for sec, vals in self.DEFAULTS.items():
             setattr(self, sec, vals)
 
     def __set_ksconf(self, ksconf):
diff --git a/scripts/lib/wic/creator.py b/scripts/lib/wic/creator.py
index 5231297..d0158fb 100644
--- a/scripts/lib/wic/creator.py
+++ b/scripts/lib/wic/creator.py
@@ -41,7 +41,7 @@ class Creator(object):
 
         # get cmds from pluginmgr
         # mix-in do_subcmd interface
-        for subcmd, klass in pluginmgr.get_plugins('imager').iteritems():
+        for subcmd, klass in pluginmgr.get_plugins('imager').items():
             if not hasattr(klass, 'do_create'):
                 msger.warning("Unsupported subcmd: %s" % subcmd)
                 continue
diff --git a/scripts/lib/wic/help.py b/scripts/lib/wic/help.py
index 158b6c1..7dcc717 100644
--- a/scripts/lib/wic/help.py
+++ b/scripts/lib/wic/help.py
@@ -66,7 +66,7 @@ def get_wic_plugins_help():
     result = wic_plugins_help
     for plugin_type in PLUGIN_TYPES:
         result += '\n\n%s PLUGINS\n\n' % plugin_type.upper()
-        for name, plugin in pluginmgr.get_plugins(plugin_type).iteritems():
+        for name, plugin in pluginmgr.get_plugins(plugin_type).items():
             result += "\n %s plugin:\n" % name
             if plugin.__doc__:
                 result += plugin.__doc__
diff --git a/scripts/lib/wic/plugin.py b/scripts/lib/wic/plugin.py
index ccfdfcb..80c609c 100644
--- a/scripts/lib/wic/plugin.py
+++ b/scripts/lib/wic/plugin.py
@@ -81,7 +81,7 @@ class PluginMgr(object):
             # the value True/False means "loaded"
 
     def _load_all(self):
-        for (pdir, loaded) in self.plugin_dirs.iteritems():
+        for (pdir, loaded) in self.plugin_dirs.items():
             if loaded:
                 continue
 
@@ -135,7 +135,7 @@ class PluginMgr(object):
         None is returned.
         """
         return_methods = None
-        for _source_name, klass in self.get_plugins('source').iteritems():
+        for _source_name, klass in self.get_plugins('source').items():
             if _source_name == source_name:
                 for _method_name in methods.keys():
                     if not hasattr(klass, _method_name):


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]