mirror of
https://github.com/aiogram/aiogram.git
synced 2025-12-15 03:08:51 +00:00
Small fix
This commit is contained in:
parent
d2c99fccf4
commit
0ae4f6d948
7 changed files with 19 additions and 5 deletions
|
|
@ -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()
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import datetime
|
||||
import json
|
||||
from ..utils import json
|
||||
import time
|
||||
|
||||
from .base import BaseBot
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue