1
0
Fork 0
mirror of https://github.com/myned/modufur.git synced 2024-12-24 14:27:27 +00:00

Removed redundant global definition

This commit is contained in:
Myned 2017-10-28 15:39:04 -04:00
parent 18bae80a1d
commit 6ee7a251d4

View file

@ -87,8 +87,6 @@ session = aiohttp.ClientSession()
def close(loop): def close(loop):
global session
if session: if session:
session.close() session.close()
@ -104,8 +102,6 @@ def close(loop):
async def fetch(url, *, params={}, json=False): async def fetch(url, *, params={}, json=False):
global session
async with session.get(url, params=params, headers={'User-Agent': 'Myned/Modumind/dev'}) as r: async with session.get(url, params=params, headers={'User-Agent': 'Myned/Modumind/dev'}) as r:
if json: if json:
return await r.json() return await r.json()