mirror of
https://github.com/Jylpah/blitz-tools.git
synced 2026-10-21 10:17:05 +02:00
Fix
This commit is contained in:
1 parent
691deb7c80
commit
2603c1611c
1 file changed
+1
-2
+1
-2
@@ -263,7 +263,6 @@ async def get_url_JSON(session: aiohttp.ClientSession, url: str, chk_JSON_func =
|
||||
## To avoid excessive use of servers
|
||||
for retry in range(1,max_tries+1):
|
||||
try:
|
||||
await asyncio.sleep(SLEEP)
|
||||
async with session.get(url) as resp:
|
||||
if resp.status == 200:
|
||||
debug('HTTP request OK')
|
||||
@@ -275,7 +274,7 @@ async def get_url_JSON(session: aiohttp.ClientSession, url: str, chk_JSON_func =
|
||||
if retry == max_tries:
|
||||
break
|
||||
debug('Retrying URL [' + str(retry) + '/' + str(max_tries) + ']: ' + url )
|
||||
|
||||
await asyncio.sleep(SLEEP)
|
||||
|
||||
except aiohttp.ClientError as err:
|
||||
debug("Could not retrieve URL: " + url)
|
||||
|
||||
Reference in new issue
Block a user