From d88a34f1a5c45a23ca9ac02486b880f3649fb356 Mon Sep 17 00:00:00 2001 From: phxntxm Date: Sat, 14 Jul 2018 23:05:43 -0500 Subject: [PATCH] Asyncio changed, need async with now --- cogs/utils/utilities.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cogs/utils/utilities.py b/cogs/utils/utilities.py index 9c301d2..1f6a16f 100644 --- a/cogs/utils/utilities.py +++ b/cogs/utils/utilities.py @@ -71,7 +71,7 @@ async def request(url, *, headers=None, payload=None, method='GET', attr='json', for i in range(5): try: # Create the session with our headeres - with aiohttp.ClientSession(headers=headers) as session: + async with aiohttp.ClientSession(headers=headers) as session: # Make the request, based on the method, url, and paramaters given async with session.request(method, url, params=payload) as response: # If the request wasn't successful, re-attempt