refactor: drop the unreachable except aiohttp.ClientError: raise

T3-21: neither curl_cffi nor noble_tls raises aiohttp exceptions (verified in
both packages' sources), so the branch could not run. every error a real
backend raises maps exactly as before; the asyncio.TimeoutError guard stays
(TimeoutError is an OSError on 3.11+). folds into 1.0.5.

Signed-off-by: disqualifier <dev@disqualifier.me>
This commit is contained in:
dsql committed 2026-10-16 04:38:41 -04:00
1 parent 56a5db9c0c
commit d8cbbb9237
1 file changed
+2 -4
+2 -4
View File
@@ -172,9 +172,8 @@ class CurlCffi:
try:
response = await session.request(method, url, impersonate=impersonate, **kwargs)
except aiohttp.ClientError:
raise
except asyncio.TimeoutError:
# TimeoutError is an OSError (3.11+): keep it out of the wrap below
raise
except OSError as error:
if _is_timeout_error(error):
@@ -316,9 +315,8 @@ class Noble:
try:
response = await session.execute_request(method=method.upper(), url=url, **kwargs)
except aiohttp.ClientError:
raise
except asyncio.TimeoutError:
# TimeoutError is an OSError (3.11+): keep it out of the wrap below
raise
except OSError as error:
if _is_timeout_error(error):