mirror of
https://github.com/PaiGramTeam/PaiGram.git
synced 2024-11-22 07:07:46 +00:00
🐛 Fix wrong params passed to isinstance
This commit is contained in:
parent
038ad5dba7
commit
6cfe029a8d
@ -32,10 +32,10 @@ class ErrorHandler(Plugin):
|
||||
async def error_handler(self, update: object, context: CallbackContext) -> None:
|
||||
"""记录错误并发送消息通知开发人员。 logger the error and send a telegram message to notify the developer."""
|
||||
|
||||
if isinstance(NetworkError, context.error):
|
||||
if isinstance(context.error, NetworkError):
|
||||
logger.error("Bot请求异常", exc_info=context.error)
|
||||
return
|
||||
if isinstance(TimedOut, context.error):
|
||||
if isinstance(context.error, TimedOut):
|
||||
logger.error("Bot请求超时", exc_info=context.error)
|
||||
return
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user