mirror of
https://git.launchpad.net/~ubuntu-release/britney/+git/britney2-ubuntu
synced 2025-06-07 07:41:31 +00:00
auto-hinter: Remove some now redundant conditionals
Made possibly be the previous commit. Signed-off-by: Niels Thykier <niels@thykier.net>
This commit is contained in:
parent
3294c99036
commit
e517c3f315
11
britney.py
11
britney.py
@ -2882,17 +2882,14 @@ class Britney(object):
|
|||||||
for name, excuse in excuses.items() if name in valid_excuses}
|
for name, excuse in excuses.items() if name in valid_excuses}
|
||||||
|
|
||||||
def find_related(e, hint, circular_first=False):
|
def find_related(e, hint, circular_first=False):
|
||||||
if e not in valid_excuses:
|
|
||||||
return False
|
|
||||||
excuse = excuses[e]
|
excuse = excuses[e]
|
||||||
if e in sources_t and sources_t[e][VERSION] == excuse.ver[1]:
|
|
||||||
return True
|
|
||||||
if not circular_first:
|
if not circular_first:
|
||||||
hint[e] = excuse.ver[1]
|
hint[e] = excuse.ver[1]
|
||||||
if not excuse.deps:
|
if not excuse.deps:
|
||||||
return hint
|
return hint
|
||||||
for p in excuse.deps:
|
for p in excuses_deps[e]:
|
||||||
if p in hint: continue
|
if p in hint or p not in valid_excuses:
|
||||||
|
continue
|
||||||
if not find_related(p, hint):
|
if not find_related(p, hint):
|
||||||
return False
|
return False
|
||||||
return hint
|
return hint
|
||||||
@ -2903,8 +2900,6 @@ class Britney(object):
|
|||||||
seen_hints = set()
|
seen_hints = set()
|
||||||
for e in valid_excuses:
|
for e in valid_excuses:
|
||||||
excuse = excuses[e]
|
excuse = excuses[e]
|
||||||
if e in sources_t and sources_t[e][VERSION] == excuse.ver[1]:
|
|
||||||
continue
|
|
||||||
if excuse.deps:
|
if excuse.deps:
|
||||||
hint = find_related(e, {}, True)
|
hint = find_related(e, {}, True)
|
||||||
if isinstance(hint, dict) and e in hint:
|
if isinstance(hint, dict) and e in hint:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user