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/recipetool/append.py | |
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/recipetool/append.py')
-rw-r--r-- | scripts/lib/recipetool/append.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/scripts/lib/recipetool/append.py b/scripts/lib/recipetool/append.py index 558fd25ac5..35756b08af 100644 --- a/scripts/lib/recipetool/append.py +++ b/scripts/lib/recipetool/append.py | |||
@@ -61,7 +61,7 @@ def find_target_file(targetpath, d, pkglist=None): | |||
61 | '/etc/gshadow': '/etc/gshadow should be managed through the useradd and extrausers classes', | 61 | '/etc/gshadow': '/etc/gshadow should be managed through the useradd and extrausers classes', |
62 | '${sysconfdir}/hostname': '${sysconfdir}/hostname contents should be set by setting hostname_pn-base-files = "value" in configuration',} | 62 | '${sysconfdir}/hostname': '${sysconfdir}/hostname contents should be set by setting hostname_pn-base-files = "value" in configuration',} |
63 | 63 | ||
64 | for pthspec, message in invalidtargets.iteritems(): | 64 | for pthspec, message in invalidtargets.items(): |
65 | if fnmatch.fnmatchcase(targetpath, d.expand(pthspec)): | 65 | if fnmatch.fnmatchcase(targetpath, d.expand(pthspec)): |
66 | raise InvalidTargetFileError(d.expand(message)) | 66 | raise InvalidTargetFileError(d.expand(message)) |
67 | 67 | ||
@@ -152,7 +152,7 @@ def determine_file_source(targetpath, rd): | |||
152 | # Check patches | 152 | # Check patches |
153 | srcpatches = [] | 153 | srcpatches = [] |
154 | patchedfiles = oe.recipeutils.get_recipe_patched_files(rd) | 154 | patchedfiles = oe.recipeutils.get_recipe_patched_files(rd) |
155 | for patch, filelist in patchedfiles.iteritems(): | 155 | for patch, filelist in patchedfiles.items(): |
156 | for fileitem in filelist: | 156 | for fileitem in filelist: |
157 | if fileitem[0] == srcpath: | 157 | if fileitem[0] == srcpath: |
158 | srcpatches.append((patch, fileitem[1])) | 158 | srcpatches.append((patch, fileitem[1])) |
@@ -270,7 +270,7 @@ def appendfile(args): | |||
270 | postinst_pns = [] | 270 | postinst_pns = [] |
271 | 271 | ||
272 | selectpn = None | 272 | selectpn = None |
273 | for targetpath, pnlist in recipes.iteritems(): | 273 | for targetpath, pnlist in recipes.items(): |
274 | for pn in pnlist: | 274 | for pn in pnlist: |
275 | if pn.startswith('?'): | 275 | if pn.startswith('?'): |
276 | alternative_pns.append(pn[1:]) | 276 | alternative_pns.append(pn[1:]) |
@@ -351,7 +351,7 @@ def appendsrc(args, files, rd, extralines=None): | |||
351 | 351 | ||
352 | copyfiles = {} | 352 | copyfiles = {} |
353 | extralines = extralines or [] | 353 | extralines = extralines or [] |
354 | for newfile, srcfile in files.iteritems(): | 354 | for newfile, srcfile in files.items(): |
355 | src_destdir = os.path.dirname(srcfile) | 355 | src_destdir = os.path.dirname(srcfile) |
356 | if not args.use_workdir: | 356 | if not args.use_workdir: |
357 | if rd.getVar('S', True) == rd.getVar('STAGING_KERNEL_DIR', True): | 357 | if rd.getVar('S', True) == rd.getVar('STAGING_KERNEL_DIR', True): |