1
0
mirror of https://git.yoctoproject.org/poky synced 2026-07-16 15:57:04 +00:00

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>
This commit is contained in:
Ed Bartosh
2016-05-18 21:39:44 +03:00
committed by Richard Purdie
parent 63404baadb
commit 7eab022d4b
16 changed files with 51 additions and 51 deletions
+5 -5
View File
@@ -59,8 +59,8 @@ def collect_bbvars(metadir):
for root,dirs,files in os.walk(metadir):
for name in files:
if name.find(".bb") >= 0:
for key in recipe_bbvars(os.path.join(root,name)).iterkeys():
if bbvars.has_key(key):
for key in recipe_bbvars(os.path.join(root,name)).keys():
if key in bbvars:
bbvars[key] = bbvars[key] + 1
else:
bbvars[key] = 1
@@ -155,15 +155,15 @@ def main():
# Collect all the variable names from the recipes in the metadirs
for m in metadirs:
for key,cnt in collect_bbvars(m).iteritems():
if bbvars.has_key(key):
for key,cnt in collect_bbvars(m).items():
if key in bbvars:
bbvars[key] = bbvars[key] + cnt
else:
bbvars[key] = cnt
# Check each var for documentation
varlen = 0
for v in bbvars.iterkeys():
for v in bbvars.keys():
if len(v) > varlen:
varlen = len(v)
if not bbvar_is_documented(v, docfiles):