mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-02 20:32:58 +02:00
...
This commit is contained in:
parent
bd3b162d7a
commit
fd002b6680
1 changed files with 2 additions and 2 deletions
|
|
@ -172,9 +172,9 @@ def __call__(self, selector, root=None):
|
|||
yield item
|
||||
seen.add(item)
|
||||
|
||||
def has_matches(self, selector):
|
||||
def has_matches(self, selector, root=None):
|
||||
'Return True iff selector matches at least one item in the tree'
|
||||
for elem in self(selector):
|
||||
for elem in self(selector, root=root):
|
||||
return True
|
||||
return False
|
||||
# }}}
|
||||
|
|
|
|||
Loading…
Reference in a new issue