Stop using dict.iter* methods

Signed-off-by: Julien Cristau <jcristau@debian.org>
debian
Julien Cristau 10 years ago committed by Niels Thykier
parent 16f77bf6f9
commit 2eee806263

@ -485,7 +485,7 @@ class Britney(object):
possible_dep_ranges[key] = sat possible_dep_ranges[key] = sat
if dep: if dep:
for clause in possible_dep_ranges.itervalues(): for clause in possible_dep_ranges.values():
relations.add_dependency_clause(clause) relations.add_dependency_clause(clause)
self._inst_tester = builder.build() self._inst_tester = builder.build()
@ -1901,7 +1901,7 @@ class Britney(object):
ptuple = check[p] ptuple = check[p]
binary, _, parch = ptuple binary, _, parch = ptuple
rdeps = [ bin for bin in binaries_t[parch][0][binary][RDEPENDS] \ rdeps = [ bin for bin in binaries_t[parch][0][binary][RDEPENDS] \
if bin in [y[0] for y in smoothbins.itervalues()] ] if bin in [y[0] for y in smoothbins.values()] ]
if rdeps: if rdeps:
smoothbins[p] = ptuple smoothbins[p] = ptuple
@ -1937,7 +1937,7 @@ class Britney(object):
version = self.binaries[suite][parch][0][binary][VERSION] version = self.binaries[suite][parch][0][binary][VERSION]
adds.add((binary, version, parch)) adds.add((binary, version, parch))
return (adds, rms, set(smoothbins.itervalues())) return (adds, rms, set(smoothbins.values()))
def doop_source(self, item, hint_undo=None, removals=frozenset()): def doop_source(self, item, hint_undo=None, removals=frozenset()):
@ -2829,7 +2829,7 @@ class Britney(object):
print('* %s' % (arch,)) print('* %s' % (arch,))
for (src, ver), pkgs in sorted(all.iteritems()): for (src, ver), pkgs in sorted(all.items()):
print(' %s (%s): %s' % (src, ver, ' '.join(sorted(pkgs)))) print(' %s (%s): %s' % (src, ver, ' '.join(sorted(pkgs))))
print print

@ -220,7 +220,7 @@ def register_reverses(packages, provides, check_doubles=True, iterator=None,
the loops. the loops.
""" """
if iterator is None: if iterator is None:
iterator = packages.iterkeys() iterator = packages.keys()
else: else:
iterator = ifilter_only(packages, iterator) iterator = ifilter_only(packages, iterator)

@ -388,7 +388,7 @@ class InstallabilityTesterBuilder(object):
ekey = (deps, con, rdeps) ekey = (deps, con, rdeps)
find_eqv_table[ekey].append(pkg) find_eqv_table[ekey].append(pkg)
for pkg_list in find_eqv_table.itervalues(): for pkg_list in find_eqv_table.values():
if len(pkg_list) < 2: if len(pkg_list) < 2:
continue continue

Loading…
Cancel
Save