File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed
Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -158,6 +158,7 @@ def get_top(self, entries=None):
158158 Find the most frequently occurring set of key=value pairs
159159
160160 :param entries: iterable, providing entry dicts
161+ :return: list of remaining entries
161162 """
162163 if entries is None :
163164 entries = self .all_entries
@@ -205,10 +206,7 @@ def get_top(self, entries=None):
205206
206207 log .debug ("%s entries remaining" , len (remaining ))
207208 assert len (remaining ) < len (entries )
208- try :
209- return self .get_top (remaining )
210- except StopIteration :
211- return top
209+ return remaining
212210
213211 def get_exclusions (self ):
214212 """
@@ -217,9 +215,15 @@ def get_exclusions(self):
217215 :return: list, Exclusion instances
218216 """
219217 try :
220- self .get_top ()
218+ remaining = self .get_top ()
221219 except StopIteration :
222220 pass
221+ else :
222+ try :
223+ while True :
224+ remaining = self .get_top (remaining )
225+ except StopIteration :
226+ pass
223227
224228 return self .exclusions
225229
You can’t perform that action at this time.
0 commit comments