forked from OSchip/llvm-project
Python compat - iteritems() vs. items()
Always use `items()` and introduce extra `list(...)` call when needed. Differential Revision: https://reviews.llvm.org/D56257 llvm-svn: 350312
This commit is contained in:
parent
beb6fee542
commit
873cba17b2
|
@ -75,7 +75,7 @@ class EnumType(type):
|
|||
def makeKey(item):
|
||||
return (item[1], item[0])
|
||||
e = []
|
||||
for pair in sorted(self._nameMap.iteritems(), key=makeKey):
|
||||
for pair in sorted(self._nameMap.items(), key=makeKey):
|
||||
e.append(pair)
|
||||
return e
|
||||
|
||||
|
|
|
@ -52,10 +52,10 @@ class PhabObjectCache:
|
|||
return self.id2PhabObjects[id]
|
||||
|
||||
def get_ids_in_cache(self):
|
||||
return self.id2PhabObjects.keys()
|
||||
return list(self.id2PhabObjects.keys())
|
||||
|
||||
def get_objects(self):
|
||||
return self.id2PhabObjects.values()
|
||||
return list(self.id2PhabObjects.values())
|
||||
|
||||
DEFAULT_DIRECTORY = "PhabObjectCache"
|
||||
|
||||
|
|
|
@ -183,7 +183,7 @@ def ValidateChecksums(reference_checksums,
|
|||
if len(new_checksums) != len(reference_checksums):
|
||||
return False
|
||||
|
||||
for proj, checksum in new_checksums.iteritems():
|
||||
for proj, checksum in new_checksums.items():
|
||||
# We never computed a checksum for this project.
|
||||
if proj not in reference_checksums:
|
||||
return False
|
||||
|
|
Loading…
Reference in New Issue