mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-05-03 15:23:42 +03:00
Fix RpcError catch-all
This commit is contained in:
parent
9431e5cc3e
commit
faaa038825
|
@ -368,7 +368,7 @@ async def qr_login(self: 'TelegramClient', ignored_ids: typing.List[int] = None)
|
||||||
async def log_out(self: 'TelegramClient') -> bool:
|
async def log_out(self: 'TelegramClient') -> bool:
|
||||||
try:
|
try:
|
||||||
await self(_tl.fn.auth.LogOut())
|
await self(_tl.fn.auth.LogOut())
|
||||||
except errors.RPCError:
|
except errors.RpcError:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
await self.disconnect()
|
await self.disconnect()
|
||||||
|
|
|
@ -143,5 +143,5 @@ ServerError = _mk_error_type(code=500, doc="""
|
||||||
# Witnessed as -503 for "Timeout"
|
# Witnessed as -503 for "Timeout"
|
||||||
BotTimeout = TimedOutError = _mk_error_type(code=503, doc="""
|
BotTimeout = TimedOutError = _mk_error_type(code=503, doc="""
|
||||||
Clicking the inline buttons of bots that never (or take to long to)
|
Clicking the inline buttons of bots that never (or take to long to)
|
||||||
call ``answerCallbackQuery`` will result in this "special" RPCError.
|
call ``answerCallbackQuery`` will result in this "special" RpcError.
|
||||||
""")
|
""")
|
||||||
|
|
|
@ -80,7 +80,7 @@ class ChatGetter(abc.ABC):
|
||||||
self._chat = d.entity
|
self._chat = d.entity
|
||||||
self._input_chat = d.input_entity
|
self._input_chat = d.input_entity
|
||||||
break
|
break
|
||||||
except errors.RPCError:
|
except errors.RpcError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
return self._input_chat
|
return self._input_chat
|
||||||
|
|
Loading…
Reference in New Issue
Block a user