Fix RpcError catch-all

This commit is contained in:
Lonami Exo 2022-02-07 11:01:18 +01:00
parent 9431e5cc3e
commit faaa038825
3 changed files with 3 additions and 3 deletions

View File

@ -368,7 +368,7 @@ async def qr_login(self: 'TelegramClient', ignored_ids: typing.List[int] = None)
async def log_out(self: 'TelegramClient') -> bool:
try:
await self(_tl.fn.auth.LogOut())
except errors.RPCError:
except errors.RpcError:
return False
await self.disconnect()

View File

@ -143,5 +143,5 @@ ServerError = _mk_error_type(code=500, doc="""
# Witnessed as -503 for "Timeout"
BotTimeout = TimedOutError = _mk_error_type(code=503, doc="""
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.
""")

View File

@ -80,7 +80,7 @@ class ChatGetter(abc.ABC):
self._chat = d.entity
self._input_chat = d.input_entity
break
except errors.RPCError:
except errors.RpcError:
pass
return self._input_chat