mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-08 21:10:29 +00:00
Fix RequestIter.__next__ propagating StopAsyncIteration (#1117)
This commit is contained in:
@@ -81,7 +81,10 @@ class RequestIter(abc.ABC):
|
|||||||
return result
|
return result
|
||||||
|
|
||||||
def __next__(self):
|
def __next__(self):
|
||||||
return self.client.loop.run_until_complete(self.__anext__())
|
try:
|
||||||
|
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
|
||||||
|
Reference in New Issue
Block a user