mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-26 11:23:46 +03:00
Fix RequestIter.__next__ propagating StopAsyncIteration (#1117)
This commit is contained in:
parent
8429f9bd3c
commit
70e0d865a8
|
@ -81,7 +81,10 @@ class RequestIter(abc.ABC):
|
||||||
return result
|
return result
|
||||||
|
|
||||||
def __next__(self):
|
def __next__(self):
|
||||||
|
try:
|
||||||
return self.client.loop.run_until_complete(self.__anext__())
|
return self.client.loop.run_until_complete(self.__anext__())
|
||||||
|
except StopAsyncIteration:
|
||||||
|
raise StopIteration
|
||||||
|
|
||||||
def __aiter__(self):
|
def __aiter__(self):
|
||||||
self.buffer = None
|
self.buffer = None
|
||||||
|
|
Loading…
Reference in New Issue
Block a user