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:24:01 +0100 |
commit | 7eab022d4b484aec40998f95835ba46c5da168cf (patch) | |
tree | e88a3bf01eada7d44e41bfadee5721ce6ec198e0 /scripts/lib/devtool | |
parent | 63404baadbfd1225bbb955f8c8f817073aef65d8 (diff) | |
download | poky-7eab022d4b484aec40998f95835ba46c5da168cf.tar.gz |
scripts: Fix deprecated dict methods for python3
Replaced iteritems -> items, itervalues -> values,
iterkeys -> keys or 'in'
(From OE-Core rev: 25d4d8274bac696a484f83d7f3ada778cf95f4d0)
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
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): | |||
155 | 155 | ||
156 | workspacepn = pn | 156 | workspacepn = pn |
157 | 157 | ||
158 | for recipe, value in workspace.iteritems(): | 158 | for recipe, value in workspace.items(): |
159 | if recipe == pn: | 159 | if recipe == pn: |
160 | break | 160 | break |
161 | if bbclassextend: | 161 | 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): | |||
1091 | else: | 1091 | else: |
1092 | files_dir = os.path.join(os.path.dirname(recipefile), | 1092 | files_dir = os.path.join(os.path.dirname(recipefile), |
1093 | rd.getVar('BPN', True)) | 1093 | rd.getVar('BPN', True)) |
1094 | for basepath, path in upd_f.iteritems(): | 1094 | for basepath, path in upd_f.items(): |
1095 | logger.info('Updating file %s' % basepath) | 1095 | logger.info('Updating file %s' % basepath) |
1096 | _move_file(os.path.join(local_files_dir, basepath), path) | 1096 | _move_file(os.path.join(local_files_dir, basepath), path) |
1097 | update_srcuri= True | 1097 | update_srcuri= True |
1098 | for basepath, path in new_f.iteritems(): | 1098 | for basepath, path in new_f.items(): |
1099 | logger.info('Adding new file %s' % basepath) | 1099 | logger.info('Adding new file %s' % basepath) |
1100 | _move_file(os.path.join(local_files_dir, basepath), | 1100 | _move_file(os.path.join(local_files_dir, basepath), |
1101 | os.path.join(files_dir, basepath)) | 1101 | os.path.join(files_dir, basepath)) |
@@ -1173,11 +1173,11 @@ def _update_recipe_patch(args, config, workspace, srctree, rd, config_data): | |||
1173 | logger.info('No patches or local source files needed updating') | 1173 | logger.info('No patches or local source files needed updating') |
1174 | else: | 1174 | else: |
1175 | # Update existing files | 1175 | # Update existing files |
1176 | for basepath, path in upd_f.iteritems(): | 1176 | for basepath, path in upd_f.items(): |
1177 | logger.info('Updating file %s' % basepath) | 1177 | logger.info('Updating file %s' % basepath) |
1178 | _move_file(os.path.join(local_files_dir, basepath), path) | 1178 | _move_file(os.path.join(local_files_dir, basepath), path) |
1179 | updatefiles = True | 1179 | updatefiles = True |
1180 | for basepath, path in upd_p.iteritems(): | 1180 | for basepath, path in upd_p.items(): |
1181 | patchfn = os.path.join(patches_dir, basepath) | 1181 | patchfn = os.path.join(patches_dir, basepath) |
1182 | if changed_revs is not None: | 1182 | if changed_revs is not None: |
1183 | # Avoid updating patches that have not actually changed | 1183 | # Avoid updating patches that have not actually changed |
@@ -1192,13 +1192,13 @@ def _update_recipe_patch(args, config, workspace, srctree, rd, config_data): | |||
1192 | # Add any new files | 1192 | # Add any new files |
1193 | files_dir = os.path.join(os.path.dirname(recipefile), | 1193 | files_dir = os.path.join(os.path.dirname(recipefile), |
1194 | rd.getVar('BPN', True)) | 1194 | rd.getVar('BPN', True)) |
1195 | for basepath, path in new_f.iteritems(): | 1195 | for basepath, path in new_f.items(): |
1196 | logger.info('Adding new file %s' % basepath) | 1196 | logger.info('Adding new file %s' % basepath) |
1197 | _move_file(os.path.join(local_files_dir, basepath), | 1197 | _move_file(os.path.join(local_files_dir, basepath), |
1198 | os.path.join(files_dir, basepath)) | 1198 | os.path.join(files_dir, basepath)) |
1199 | srcuri.append('file://%s' % basepath) | 1199 | srcuri.append('file://%s' % basepath) |
1200 | updaterecipe = True | 1200 | updaterecipe = True |
1201 | for basepath, path in new_p.iteritems(): | 1201 | for basepath, path in new_p.items(): |
1202 | logger.info('Adding new patch %s' % basepath) | 1202 | logger.info('Adding new patch %s' % basepath) |
1203 | _move_file(os.path.join(patches_dir, basepath), | 1203 | _move_file(os.path.join(patches_dir, basepath), |
1204 | os.path.join(files_dir, basepath)) | 1204 | os.path.join(files_dir, basepath)) |
@@ -1285,7 +1285,7 @@ def update_recipe(args, config, basepath, workspace): | |||
1285 | def status(args, config, basepath, workspace): | 1285 | def status(args, config, basepath, workspace): |
1286 | """Entry point for the devtool 'status' subcommand""" | 1286 | """Entry point for the devtool 'status' subcommand""" |
1287 | if workspace: | 1287 | if workspace: |
1288 | for recipe, value in workspace.iteritems(): | 1288 | for recipe, value in workspace.items(): |
1289 | recipefile = value['recipefile'] | 1289 | recipefile = value['recipefile'] |
1290 | if recipefile: | 1290 | if recipefile: |
1291 | recipestr = ' (%s)' % recipefile | 1291 | 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): | |||
70 | def _recipe_contains(rd, var): | 70 | def _recipe_contains(rd, var): |
71 | rf = rd.getVar('FILE', True) | 71 | rf = rd.getVar('FILE', True) |
72 | varfiles = oe.recipeutils.get_var_files(rf, [var], rd) | 72 | varfiles = oe.recipeutils.get_var_files(rf, [var], rd) |
73 | for var, fn in varfiles.iteritems(): | 73 | for var, fn in varfiles.items(): |
74 | if fn and fn.startswith(os.path.dirname(rf) + os.sep): | 74 | if fn and fn.startswith(os.path.dirname(rf) + os.sep): |
75 | return True | 75 | return True |
76 | return False | 76 | return False |