Fix log spam from injection related errors

This commit is contained in:
TrainDoctor
2022-08-17 12:57:41 -07:00
parent 5960c11d60
commit 59038f65ac
+5 -2
View File
@@ -5,6 +5,7 @@ from logging import debug, getLogger
from traceback import format_exc
from aiohttp import ClientSession
from aiohttp.client_exceptions import ClientConnectorError
BASE_ADDRESS = "http://localhost:8080"
@@ -65,11 +66,13 @@ async def get_tabs():
while True:
try:
res = await web.get(f"{BASE_ADDRESS}/json")
break
except:
except ClientConnectorError:
logger.debug("ClientConnectorError excepted.")
logger.debug("Steam isn't available yet. Wait for a moment...")
logger.debug(format_exc())
await sleep(5)
else:
break
if res.status == 200:
r = await res.json()