diff --git a/.ruff.toml b/.ruff.toml index 0b513515eb..f695d22b1e 100644 --- a/.ruff.toml +++ b/.ruff.toml @@ -8,6 +8,7 @@ lint.ignore = [ "ARG001", "ARG002", "ARG005", + "ASYNC109", "BLE001", "COM812", "COM819", diff --git a/src/tribler/core/session.py b/src/tribler/core/session.py index 8b94cba5f0..c0cbd8d971 100644 --- a/src/tribler/core/session.py +++ b/src/tribler/core/session.py @@ -81,7 +81,7 @@ async def _is_url_available(url: str, timeout: int=1) -> bool: try: async with session.get(url, timeout=timeout): return True - except asyncio.TimeoutError: + except (asyncio.TimeoutError, aiohttp.client_exceptions.ClientConnectorError): return False