Mercurial > hg
changeset 28704:1fa6fdb72275
py3: handle iter/iterkeys+iteritems python3 divergence in import-checker
author | timeless <timeless@mozdev.org> |
---|---|
date | Wed, 30 Mar 2016 08:15:37 +0000 |
parents | a274c4f9087a |
children | 0e4148950e19 |
files | contrib/import-checker.py |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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(