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:
parent
18bae80a1d
commit
6ee7a251d4
1 changed files with 0 additions and 4 deletions
|
@ -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()
|
||||||
|
|
Loading…
Reference in a new issue