We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c87b904 commit 20a1c0eCopy full SHA for 20a1c0e
src/crawlee/_utils/retry.py
@@ -40,8 +40,8 @@ async def wrapper(*args: P.args, **kwargs: P.kwargs) -> T:
40
for attempt in range(max_attempts):
41
try:
42
return await func(*args, **kwargs)
43
- except Exception as exc: # noqa: PERF203
44
- if not isinstance(exc, exception_types) or attempt >= max_attempts - 1:
+ except exception_types as exc: # noqa: PERF203
+ if attempt >= max_attempts - 1:
45
raise
46
await _retry_sleep(base_delay_seconds * (2**attempt))
47
raise RuntimeError('Unreachable')
0 commit comments