Small fix

This commit is contained in:
Alex Root Junior 2017-07-11 23:41:40 +03:00
parent d2c99fccf4
commit 0ae4f6d948
7 changed files with 19 additions and 5 deletions

View file

@ -4,6 +4,7 @@ import os
import aiohttp
from ..exceptions import ValidationError, TelegramAPIError
from ..utils import json
log = logging.getLogger('aiogram')
@ -40,7 +41,7 @@ async def _check_result(method_name, response):
raise TelegramAPIError(f"The server returned HTTP {response.status}. Response body:\n[{body}]",
method_name, response.status, body)
result_json = await response.json()
result_json = await response.json(loads=json.loads)
if not result_json.get('ok'):
body = await response.text()

View file

@ -1,10 +1,10 @@
import asyncio
import io
import json
import aiohttp
from . import api
from ..utils import json
from ..utils.payload import generate_payload

View file

@ -1,5 +1,5 @@
import datetime
import json
from ..utils import json
import time
from .base import BaseBot