mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
bd3b162d7a
commit
fd002b6680
@ -172,9 +172,9 @@ class Select(object):
|
||||
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…
x
Reference in New Issue
Block a user