py3: handle iter/iterkeys+iteritems python3 divergence in import-checker
authortimeless <timeless@mozdev.org>
Wed, 30 Mar 2016 08:15:37 +0000
changeset 28704 1fa6fdb72275
parent 28703 a274c4f9087a
child 28705 0e4148950e19
py3: handle iter/iterkeys+iteritems python3 divergence in import-checker
contrib/import-checker.py
--- a/contrib/import-checker.py	Wed Mar 30 04:55:16 2016 +0000
+++ b/contrib/import-checker.py	Wed Mar 30 08:15:37 2016 +0000
@@ -554,7 +554,7 @@
     top.foo -> top.qux -> top.foo
     """
     cycles = set()
-    for mod in sorted(imports.iterkeys()):
+    for mod in sorted(imports.keys()):
         try:
             checkmod(mod, imports)
         except CircularImport as e:
@@ -578,7 +578,7 @@
     for source_path in argv[1:]:
         modname = dotted_name_of_path(source_path, trimpure=True)
         localmods[modname] = source_path
-    for modname, source_path in sorted(localmods.iteritems()):
+    for modname, source_path in sorted(localmods.items()):
         f = open(source_path)
         src = f.read()
         used_imports[modname] = sorted(