Traverse the tree looking for matches. @param node: A node to match on. @type node: L{SchemaObject} @param list: A list to fill. @type list: list
(self, node, list)
| 655 | self.limit = limit |
| 656 | |
| 657 | def find(self, node, list): |
| 658 | """ |
| 659 | Traverse the tree looking for matches. |
| 660 | @param node: A node to match on. |
| 661 | @type node: L{SchemaObject} |
| 662 | @param list: A list to fill. |
| 663 | @type list: list |
| 664 | """ |
| 665 | if self.matcher.match(node): |
| 666 | list.append(node) |
| 667 | self.limit -= 1 |
| 668 | if self.limit == 0: |
| 669 | return |
| 670 | for c in node.rawchildren: |
| 671 | self.find(c, list) |
| 672 | return self |
no test coverage detected