Skip to content

Commit 8a65dde

Browse files
committed
tuiter wont crash if not iterators are there
1 parent 91e845e commit 8a65dde

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

pytrackunit/tuiter.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ def __aiter__(self):
5757
return self
5858

5959
async def __anext__(self):
60+
if len(self.iterators) == 0:
61+
raise StopAsyncIteration
6062
try:
6163
return await self.iterators[self.iterator_pos].__anext__()
6264
except StopAsyncIteration as exc:

0 commit comments

Comments
 (0)