Unnecessary indentation
This commit is contained in:
parent
f135279503
commit
e18299fcd6
@ -174,13 +174,13 @@ async def async_request(url, type='get', mode='json', encoding='utf-8',
|
|||||||
"""
|
"""
|
||||||
try:
|
try:
|
||||||
async with aiohttp.ClientSession() as s:
|
async with aiohttp.ClientSession() as s:
|
||||||
async with (
|
async with (
|
||||||
s.get(url, timeout=30)
|
s.get(url, timeout=30)
|
||||||
if type == 'get'
|
if type == 'get'
|
||||||
else s.post(url, timeout=30, data=kwargs)
|
else s.post(url, timeout=30, data=kwargs)
|
||||||
) as r:
|
) as r:
|
||||||
result = await r.read()
|
result = await r.read()
|
||||||
result = result.decode(encoding)
|
result = result.decode(encoding)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logging.error(
|
logging.error(
|
||||||
'Error making async request to {}:\n{}'.format(
|
'Error making async request to {}:\n{}'.format(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user