summaryrefslogtreecommitdiffstats
path: root/scripts/contrib/bbvars.py
diff options
context:
space:
mode:
authorEd Bartosh <ed.bartosh@linux.intel.com>2016-05-18 21:39:44 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-06-02 08:24:01 +0100
commit7eab022d4b484aec40998f95835ba46c5da168cf (patch)
treee88a3bf01eada7d44e41bfadee5721ce6ec198e0 /scripts/contrib/bbvars.py
parent63404baadbfd1225bbb955f8c8f817073aef65d8 (diff)
downloadpoky-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/contrib/bbvars.py')
-rwxr-xr-xscripts/contrib/bbvars.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/scripts/contrib/bbvars.py b/scripts/contrib/bbvars.py
index 04f5023969..6f479355eb 100755
--- a/scripts/contrib/bbvars.py
+++ b/scripts/contrib/bbvars.py
@@ -59,8 +59,8 @@ def collect_bbvars(metadir):
59 for root,dirs,files in os.walk(metadir): 59 for root,dirs,files in os.walk(metadir):
60 for name in files: 60 for name in files:
61 if name.find(".bb") >= 0: 61 if name.find(".bb") >= 0:
62 for key in recipe_bbvars(os.path.join(root,name)).iterkeys(): 62 for key in recipe_bbvars(os.path.join(root,name)).keys():
63 if bbvars.has_key(key): 63 if key in bbvars:
64 bbvars[key] = bbvars[key] + 1 64 bbvars[key] = bbvars[key] + 1
65 else: 65 else:
66 bbvars[key] = 1 66 bbvars[key] = 1
@@ -155,15 +155,15 @@ def main():
155 155
156 # Collect all the variable names from the recipes in the metadirs 156 # Collect all the variable names from the recipes in the metadirs
157 for m in metadirs: 157 for m in metadirs:
158 for key,cnt in collect_bbvars(m).iteritems(): 158 for key,cnt in collect_bbvars(m).items():
159 if bbvars.has_key(key): 159 if key in bbvars:
160 bbvars[key] = bbvars[key] + cnt 160 bbvars[key] = bbvars[key] + cnt
161 else: 161 else:
162 bbvars[key] = cnt 162 bbvars[key] = cnt
163 163
164 # Check each var for documentation 164 # Check each var for documentation
165 varlen = 0 165 varlen = 0
166 for v in bbvars.iterkeys(): 166 for v in bbvars.keys():
167 if len(v) > varlen: 167 if len(v) > varlen:
168 varlen = len(v) 168 varlen = len(v)
169 if not bbvar_is_documented(v, docfiles): 169 if not bbvar_is_documented(v, docfiles):