solver: Move a common variable out of an if

Signed-off-by: Niels Thykier <niels@thykier.net>
ubuntu/rebased
Niels Thykier 6 years ago
parent 1e46965924
commit c4931fb1b2
No known key found for this signature in database
GPG Key ID: A65B78DBE67C7AAC

@ -252,15 +252,14 @@ class InstallabilitySolver(InstallabilityTester):
other_adds = set() other_adds = set()
other_rms = set() other_rms = set()
for d in ifilter_only(ptable, depgroup): for d in ifilter_only(ptable, depgroup):
other = ptable[d]
if d in going_in: if d in going_in:
# "other" provides something "key" needs, # "other" provides something "key" needs,
# schedule accordingly. # schedule accordingly.
other = ptable[d]
other_adds.add(other) other_adds.add(other)
else: else:
# "other" removes something "key" needs, # "other" removes something "key" needs,
# schedule accordingly. # schedule accordingly.
other = ptable[d]
other_rms.add(other) other_rms.add(other)
for other in (other_adds - other_rms): for other in (other_adds - other_rms):

Loading…
Cancel
Save