From ca3aa504cf6169966855f3ab7a8e1efe77fced0f Mon Sep 17 00:00:00 2001 From: Alex Root Junior Date: Mon, 9 Apr 2018 00:30:38 +0300 Subject: [PATCH] Wow. Fail. Wrong method name. --- aiogram/bot/api.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/aiogram/bot/api.py b/aiogram/bot/api.py index 123c5359..4ef89d68 100644 --- a/aiogram/bot/api.py +++ b/aiogram/bot/api.py @@ -99,17 +99,17 @@ async def _check_result(method_name, response): exceptions.MethodNotKnown.throw() raise exceptions.NotFound(description) elif response.status == HTTPStatus.CONFLICT: - if exceptions.TerminatedByOtherGetUpdates.match(description): + if exceptions.TerminatedByOtherGetUpdates.check(description): exceptions.TerminatedByOtherGetUpdates.throw() - if exceptions.CantGetUpdates.match(description): + if exceptions.CantGetUpdates.check(description): exceptions.CantGetUpdates.throw() raise exceptions.ConflictError(description) elif response.status in [HTTPStatus.UNAUTHORIZED, HTTPStatus.FORBIDDEN]: - if exceptions.BotKicked.match(description): + if exceptions.BotKicked.check(description): exceptions.BotKicked.throw() - elif exceptions.BotBlocked.match(description): + elif exceptions.BotBlocked.check(description): exceptions.BotBlocked.throw() - elif exceptions.UserDeactivated.match(description): + elif exceptions.UserDeactivated.check(description): exceptions.UserDeactivated.throw() raise exceptions.Unauthorized(description) elif response.status == HTTPStatus.REQUEST_ENTITY_TOO_LARGE: