diff options
author | Ed Bartosh <ed.bartosh@linux.intel.com> | 2016-05-18 21:39:44 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-06-02 08:10:03 +0100 |
commit | 25d4d8274bac696a484f83d7f3ada778cf95f4d0 (patch) | |
tree | 626c84b436b57344bbb512870f4d2acd9f5b1195 /scripts/lib/devtool | |
parent | 210e290c9251839dc74e3aabdcea3655dd707a50 (diff) | |
download | openembedded-core-25d4d8274bac696a484f83d7f3ada778cf95f4d0.tar.gz openembedded-core-25d4d8274bac696a484f83d7f3ada778cf95f4d0.tar.bz2 openembedded-core-25d4d8274bac696a484f83d7f3ada778cf95f4d0.zip |
scripts: Fix deprecated dict methods for python3
Replaced iteritems -> items, itervalues -> values,
iterkeys -> keys or 'in'
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Diffstat (limited to 'scripts/lib/devtool')
-rw-r--r-- | scripts/lib/devtool/__init__.py | 2 | ||||
-rw-r--r-- | scripts/lib/devtool/standard.py | 14 | ||||
-rw-r--r-- | scripts/lib/devtool/upgrade.py | 2 |
3 files changed, 9 insertions, 9 deletions
diff --git a/scripts/lib/devtool/__init__.py b/scripts/lib/devtool/__init__.py index ff97dfc94b..506d95b0f7 100644 --- a/scripts/lib/devtool/__init__.py +++ b/scripts/lib/devtool/__init__.py @@ -155,7 +155,7 @@ def check_workspace_recipe(workspace, pn, checksrc=True, bbclassextend=False): workspacepn = pn - for recipe, value in workspace.iteritems(): + for recipe, value in workspace.items(): if recipe == pn: break if bbclassextend: diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py index d6186b9ece..08153c6edc 100644 --- a/scripts/lib/devtool/standard.py +++ b/scripts/lib/devtool/standard.py @@ -1091,11 +1091,11 @@ def _update_recipe_srcrev(args, srctree, rd, config_data): else: files_dir = os.path.join(os.path.dirname(recipefile), rd.getVar('BPN', True)) - for basepath, path in upd_f.iteritems(): + for basepath, path in upd_f.items(): logger.info('Updating file %s' % basepath) _move_file(os.path.join(local_files_dir, basepath), path) update_srcuri= True - for basepath, path in new_f.iteritems(): + for basepath, path in new_f.items(): logger.info('Adding new file %s' % basepath) _move_file(os.path.join(local_files_dir, basepath), os.path.join(files_dir, basepath)) @@ -1173,11 +1173,11 @@ def _update_recipe_patch(args, config, workspace, srctree, rd, config_data): logger.info('No patches or local source files needed updating') else: # Update existing files - for basepath, path in upd_f.iteritems(): + for basepath, path in upd_f.items(): logger.info('Updating file %s' % basepath) _move_file(os.path.join(local_files_dir, basepath), path) updatefiles = True - for basepath, path in upd_p.iteritems(): + for basepath, path in upd_p.items(): patchfn = os.path.join(patches_dir, basepath) if changed_revs is not None: # Avoid updating patches that have not actually changed @@ -1192,13 +1192,13 @@ def _update_recipe_patch(args, config, workspace, srctree, rd, config_data): # Add any new files files_dir = os.path.join(os.path.dirname(recipefile), rd.getVar('BPN', True)) - for basepath, path in new_f.iteritems(): + for basepath, path in new_f.items(): logger.info('Adding new file %s' % basepath) _move_file(os.path.join(local_files_dir, basepath), os.path.join(files_dir, basepath)) srcuri.append('file://%s' % basepath) updaterecipe = True - for basepath, path in new_p.iteritems(): + for basepath, path in new_p.items(): logger.info('Adding new patch %s' % basepath) _move_file(os.path.join(patches_dir, basepath), os.path.join(files_dir, basepath)) @@ -1285,7 +1285,7 @@ def update_recipe(args, config, basepath, workspace): def status(args, config, basepath, workspace): """Entry point for the devtool 'status' subcommand""" if workspace: - for recipe, value in workspace.iteritems(): + for recipe, value in workspace.items(): recipefile = value['recipefile'] if recipefile: recipestr = ' (%s)' % recipefile diff --git a/scripts/lib/devtool/upgrade.py b/scripts/lib/devtool/upgrade.py index 07a90188f3..66e5f59a01 100644 --- a/scripts/lib/devtool/upgrade.py +++ b/scripts/lib/devtool/upgrade.py @@ -70,7 +70,7 @@ def _remove_patch_dirs(recipefolder): def _recipe_contains(rd, var): rf = rd.getVar('FILE', True) varfiles = oe.recipeutils.get_var_files(rf, [var], rd) - for var, fn in varfiles.iteritems(): + for var, fn in varfiles.items(): if fn and fn.startswith(os.path.dirname(rf) + os.sep): return True return False |