Wow. Fail. Wrong method name.

This commit is contained in:
Alex Root Junior 2018-04-09 00:30:38 +03:00
parent 15c85c53db
commit ca3aa504cf

View file

@ -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: