Claude clean up

This commit is contained in:
Andras Schmelczer 2026-05-03 11:06:19 +01:00
parent eed1567f7f
commit 8609b4a884
11 changed files with 48 additions and 63 deletions

View file

@ -9,7 +9,8 @@ def urlopen_with_retry(req: Request, timeout: int = 30):
for delay in (3, 10, None):
try:
return urlopen(req, timeout=timeout)
except (URLError, TimeoutError):
except (URLError, TimeoutError) as e:
if delay is None:
raise
print(f"urlopen {req.full_url}: {e}; retry in {delay}s")
time.sleep(delay)