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
|
yield item
|
||||||
seen.add(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'
|
'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 True
|
||||||
return False
|
return False
|
||||||
# }}}
|
# }}}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user