From 9971714e279fb18fda247e840614854f5c9c1758 Mon Sep 17 00:00:00 2001 From: Niels Thykier Date: Sat, 19 Jan 2019 18:02:33 +0000 Subject: [PATCH] solver: Merge two loops by using chain Signed-off-by: Niels Thykier --- britney2/installability/solver.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/britney2/installability/solver.py b/britney2/installability/solver.py index 36ec655..c9e79e1 100644 --- a/britney2/installability/solver.py +++ b/britney2/installability/solver.py @@ -226,10 +226,8 @@ class InstallabilitySolver(object): order[key] = {'before': set(), 'after': set()} going_in.update(adds) going_out.update(rms) - for a in adds: - ptable[a] = key - for r in rms: - ptable[r] = key + for x in chain(adds, rms): + ptable[x] = key if debug_solver: # pragma: no cover self._dump_groups(groups)