Queer European MD passionate about IT
Parcourir la source

Unnecessary indentation

Davte il y a 5 ans
Parent
commit
e18299fcd6
1 fichiers modifiés avec 7 ajouts et 7 suppressions
  1. 7 7
      davtelepot/utilities.py

+ 7 - 7
davtelepot/utilities.py

@@ -174,13 +174,13 @@ async def async_request(url, type='get', mode='json', encoding='utf-8',
     """
     try:
         async with aiohttp.ClientSession() as s:
-                async with (
-                    s.get(url, timeout=30)
-                    if type == 'get'
-                    else s.post(url, timeout=30, data=kwargs)
-                ) as r:
-                    result = await r.read()
-                    result = result.decode(encoding)
+            async with (
+                s.get(url, timeout=30)
+                if type == 'get'
+                else s.post(url, timeout=30, data=kwargs)
+            ) as r:
+                result = await r.read()
+                result = result.decode(encoding)
     except Exception as e:
         logging.error(
             'Error making async request to {}:\n{}'.format(