mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #8739 (get_matches() got multiple values for keyword argument 'allow_recursion')
This commit is contained in:
parent
caf55c5256
commit
57efe4fb06
@ -420,7 +420,8 @@ class ResultCache(SearchQueryParser): # {{{
|
|||||||
return candidates - res
|
return candidates - res
|
||||||
return res
|
return res
|
||||||
|
|
||||||
def get_matches(self, location, query, allow_recursion=True, candidates=None):
|
def get_matches(self, location, query, candidates=None,
|
||||||
|
allow_recursion=True):
|
||||||
matches = set([])
|
matches = set([])
|
||||||
if candidates is None:
|
if candidates is None:
|
||||||
candidates = self.universal_set()
|
candidates = self.universal_set()
|
||||||
@ -434,8 +435,8 @@ class ResultCache(SearchQueryParser): # {{{
|
|||||||
if isinstance(location, list):
|
if isinstance(location, list):
|
||||||
if allow_recursion:
|
if allow_recursion:
|
||||||
for loc in location:
|
for loc in location:
|
||||||
matches |= self.get_matches(loc, query, candidates,
|
matches |= self.get_matches(loc, query,
|
||||||
allow_recursion=False)
|
candidates=candidates, allow_recursion=False)
|
||||||
return matches
|
return matches
|
||||||
raise ParseException(query, len(query), 'Recursive query group detected', self)
|
raise ParseException(query, len(query), 'Recursive query group detected', self)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user