mirror of
https://github.com/myned/modufur.git
synced 2024-11-01 21:02:38 +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):
|
||||
global session
|
||||
|
||||
if session:
|
||||
session.close()
|
||||
|
||||
|
@ -104,8 +102,6 @@ def close(loop):
|
|||
|
||||
|
||||
async def fetch(url, *, params={}, json=False):
|
||||
global session
|
||||
|
||||
async with session.get(url, params=params, headers={'User-Agent': 'Myned/Modumind/dev'}) as r:
|
||||
if json:
|
||||
return await r.json()
|
||||
|
|
Loading…
Reference in a new issue