From 74060e4e0a7dda63845606d7acd6405337283f19 Mon Sep 17 00:00:00 2001 From: Niels Thykier Date: Wed, 31 Dec 2014 23:30:04 +0100 Subject: [PATCH] britney.py: Avoid some redundancy in auto_hinter() Signed-off-by: Niels Thykier --- britney.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/britney.py b/britney.py index 688d147..8b9f7c0 100755 --- a/britney.py +++ b/britney.py @@ -2767,11 +2767,11 @@ class Britney(object): if e not in excuses: return False 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 if not circular_first: hint[e] = excuse.ver[1] - if len(excuse.deps) == 0: + if not excuse.deps: return hint for p in excuse.deps: if p in hint: continue @@ -2784,9 +2784,9 @@ class Britney(object): mincands = [] for e in excuses: 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 - if len(excuse.deps) > 0: + if excuse.deps: hint = find_related(e, {}, True) if isinstance(hint, dict) and e in hint and hint not in candidates: candidates.append(hint.items())