From 6ee7a251d4c4edc52665645f67aa200cc63668f4 Mon Sep 17 00:00:00 2001 From: Myned Date: Sat, 28 Oct 2017 15:39:04 -0400 Subject: [PATCH] Removed redundant global definition --- src/main/utils/utils.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/main/utils/utils.py b/src/main/utils/utils.py index 6ace555..71e5eb1 100644 --- a/src/main/utils/utils.py +++ b/src/main/utils/utils.py @@ -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()