From 7eab022d4b484aec40998f95835ba46c5da168cf Mon Sep 17 00:00:00 2001 From: Ed Bartosh Date: Wed, 18 May 2016 21:39:44 +0300 Subject: 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 Signed-off-by: Richard Purdie --- scripts/lib/recipetool/append.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'scripts/lib/recipetool/append.py') 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): '/etc/gshadow': '/etc/gshadow should be managed through the useradd and extrausers classes', '${sysconfdir}/hostname': '${sysconfdir}/hostname contents should be set by setting hostname_pn-base-files = "value" in configuration',} - for pthspec, message in invalidtargets.iteritems(): + for pthspec, message in invalidtargets.items(): if fnmatch.fnmatchcase(targetpath, d.expand(pthspec)): raise InvalidTargetFileError(d.expand(message)) @@ -152,7 +152,7 @@ def determine_file_source(targetpath, rd): # Check patches srcpatches = [] patchedfiles = oe.recipeutils.get_recipe_patched_files(rd) - for patch, filelist in patchedfiles.iteritems(): + for patch, filelist in patchedfiles.items(): for fileitem in filelist: if fileitem[0] == srcpath: srcpatches.append((patch, fileitem[1])) @@ -270,7 +270,7 @@ def appendfile(args): postinst_pns = [] selectpn = None - for targetpath, pnlist in recipes.iteritems(): + for targetpath, pnlist in recipes.items(): for pn in pnlist: if pn.startswith('?'): alternative_pns.append(pn[1:]) @@ -351,7 +351,7 @@ def appendsrc(args, files, rd, extralines=None): copyfiles = {} extralines = extralines or [] - for newfile, srcfile in files.iteritems(): + for newfile, srcfile in files.items(): src_destdir = os.path.dirname(srcfile) if not args.use_workdir: if rd.getVar('S', True) == rd.getVar('STAGING_KERNEL_DIR', True): -- cgit v1.2.3-54-g00ecf