Убрал бардак из разных скобок. Изменил импорты в app.py

This commit is contained in:
Daniil
2021-01-07 14:37:44 +02:00
parent 1bbe12e9c1
commit 3f4b06933a
8 changed files with 25 additions and 29 deletions

View File

@@ -1,4 +1,9 @@
import logging
from aiogram.utils.exceptions import (Unauthorized, InvalidQueryID, TelegramAPIError,
CantDemoteChatCreator, MessageNotModified, MessageToDeleteNotFound,
MessageTextIsEmpty, RetryAfter,
CantParseEntities, MessageCantBeDeleted)
from loader import dp
@@ -12,10 +17,6 @@ async def errors_handler(update, exception):
:param exception:
:return: stdout logging
"""
from aiogram.utils.exceptions import (Unauthorized, InvalidQueryID, TelegramAPIError,
CantDemoteChatCreator, MessageNotModified, MessageToDeleteNotFound,
MessageTextIsEmpty, RetryAfter,
CantParseEntities, MessageCantBeDeleted)
if isinstance(exception, CantDemoteChatCreator):
logging.debug("Can't demote chat creator")
@@ -53,4 +54,5 @@ async def errors_handler(update, exception):
if isinstance(exception, CantParseEntities):
logging.exception(f'CantParseEntities: {exception} \nUpdate: {update}')
return True
logging.exception(f'Update: {update} \n{exception}')