From 249a19bfef09572a3533c8342a9dbc4d88ff7685 Mon Sep 17 00:00:00 2001 From: Niels Thykier Date: Sun, 17 Jan 2016 12:27:15 +0000 Subject: [PATCH] Defer a frozenset call Signed-off-by: Niels Thykier --- installability/tester.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/installability/tester.py b/installability/tester.py index 5f43a65..986dde4 100644 --- a/installability/tester.py +++ b/installability/tester.py @@ -520,9 +520,9 @@ class InstallabilityTester(object): # - not in testing # - known to be broken (by cache) # - in never - candidates = frozenset((depgroup & testing) - never) + candidates = (depgroup & testing) - never - if len(candidates) == 0: + if not candidates: # We got no candidates to satisfy it - this # package cannot be installed with the current # testing @@ -563,7 +563,11 @@ class InstallabilityTester(object): continue elif len(candidates) == len(new_cand): stats.eqv_table_reduced_by_zero += 1 + candidates = frozenset(new_cand) + else: + # Candidates have to be a frozenset to be added to choices + candidates = frozenset(candidates) # defer this choice till later choices.add(candidates) return True