mirror of
https://git.launchpad.net/~ubuntu-release/britney/+git/britney2-ubuntu
synced 2025-05-08 00:51:36 +00:00
britney.py: Avoid some redundancy in auto_hinter()
Signed-off-by: Niels Thykier <niels@thykier.net>
This commit is contained in:
parent
11e84d01a3
commit
a13386ae34
@ -2767,11 +2767,11 @@ class Britney(object):
|
|||||||
if e not in excuses:
|
if e not in excuses:
|
||||||
return False
|
return False
|
||||||
excuse = excuses[e]
|
excuse = excuses[e]
|
||||||
if e in self.sources['testing'] and self.sources['testing'][e][VERSION] == excuse.ver[1]:
|
if e in sources_t and sources_t[e][VERSION] == excuse.ver[1]:
|
||||||
return True
|
return True
|
||||||
if not circular_first:
|
if not circular_first:
|
||||||
hint[e] = excuse.ver[1]
|
hint[e] = excuse.ver[1]
|
||||||
if len(excuse.deps) == 0:
|
if not excuse.deps:
|
||||||
return hint
|
return hint
|
||||||
for p in excuse.deps:
|
for p in excuse.deps:
|
||||||
if p in hint: continue
|
if p in hint: continue
|
||||||
@ -2784,9 +2784,9 @@ class Britney(object):
|
|||||||
mincands = []
|
mincands = []
|
||||||
for e in excuses:
|
for e in excuses:
|
||||||
excuse = excuses[e]
|
excuse = excuses[e]
|
||||||
if e in self.sources['testing'] and self.sources['testing'][e][VERSION] == excuse.ver[1]:
|
if e in sources_t and sources_t[e][VERSION] == excuse.ver[1]:
|
||||||
continue
|
continue
|
||||||
if len(excuse.deps) > 0:
|
if excuse.deps:
|
||||||
hint = find_related(e, {}, True)
|
hint = find_related(e, {}, True)
|
||||||
if isinstance(hint, dict) and e in hint and hint not in candidates:
|
if isinstance(hint, dict) and e in hint and hint not in candidates:
|
||||||
candidates.append(hint.items())
|
candidates.append(hint.items())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user