Skip to content

Commit

Permalink
Repeating.has_children just checks length, doesn't build list of chil…
Browse files Browse the repository at this point in the history
…dren (#242)
  • Loading branch information
jsfehler authored Nov 19, 2019
1 parent 4c4ef0f commit f3ca5b9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion stere/areas/repeating.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@ def __len__(self):
def _all_roots(self):
"""Search for all instances of the root.
Only intended for use inside Repeating.children().
Otherwise use self.root.find_all().
Raises:
ValueError: If no instances of the root were found.
Expand Down Expand Up @@ -129,6 +132,6 @@ def has_children(self, retry_time: typing.Optional[int] = None) -> bool:
"""
return _retry(
lambda: len(self.children()) > 0,
lambda: len(self) > 0,
retry_time=retry_time,
)

0 comments on commit f3ca5b9

Please sign in to comment.