mirror of
https://git.launchpad.net/~ubuntu-release/britney/+git/britney2-ubuntu
synced 2025-03-09 02:01:09 +00:00
Refactor some local expressions
Signed-off-by: Niels Thykier <niels@thykier.net>
This commit is contained in:
parent
7e475cd9f9
commit
e2b98872cf
@ -1583,10 +1583,9 @@ class Britney(object):
|
||||
This method returns a dictionary where the keys are the package names
|
||||
and the values are the excuse names which depend on it.
|
||||
"""
|
||||
res = {}
|
||||
res = defaultdict(list)
|
||||
for exc in self.excuses:
|
||||
for d in exc.deps:
|
||||
if d not in res: res[d] = []
|
||||
res[d].append(exc.name)
|
||||
return res
|
||||
|
||||
@ -1598,9 +1597,7 @@ class Britney(object):
|
||||
`valid' and `invalid' excuses.
|
||||
"""
|
||||
# build a lookup-by-name map
|
||||
exclookup = {}
|
||||
for e in self.excuses:
|
||||
exclookup[e.name] = e
|
||||
exclookup = {e.name: e for e in self.excuses}
|
||||
|
||||
# build the reverse dependencies
|
||||
revdeps = self.reversed_exc_deps()
|
||||
|
Loading…
x
Reference in New Issue
Block a user