britney: Use chain rather then duplicate statement

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

@ -186,6 +186,7 @@ import sys
import time import time
from collections import defaultdict from collections import defaultdict
from functools import reduce from functools import reduce
from itertools import chain
from operator import attrgetter from operator import attrgetter
from urllib.parse import quote from urllib.parse import quote
@ -2732,8 +2733,7 @@ class Britney(object):
for item, ver in items: for item, ver in items:
# excuses which depend on "item" or are depended on by it # excuses which depend on "item" or are depended on by it
new_items = set((x, excuses[x].ver[1]) for x in excuses_deps[item]) new_items = {(x, excuses[x].ver[1]) for x in chain(excuses_deps[item], excuses_rdeps[item])}
new_items.update((x, excuses[x].ver[1]) for x in excuses_rdeps[item])
new_items -= seen_items new_items -= seen_items
items.extend(new_items) items.extend(new_items)
seen_items.update(new_items) seen_items.update(new_items)

Loading…
Cancel
Save