Skip to content

Commit 20a1c0e

Browse files
MantisusCopilot
andauthored
Update src/crawlee/_utils/retry.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent c87b904 commit 20a1c0e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/crawlee/_utils/retry.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ async def wrapper(*args: P.args, **kwargs: P.kwargs) -> T:
4040
for attempt in range(max_attempts):
4141
try:
4242
return await func(*args, **kwargs)
43-
except Exception as exc: # noqa: PERF203
44-
if not isinstance(exc, exception_types) or attempt >= max_attempts - 1:
43+
except exception_types as exc: # noqa: PERF203
44+
if attempt >= max_attempts - 1:
4545
raise
4646
await _retry_sleep(base_delay_seconds * (2**attempt))
4747
raise RuntimeError('Unreachable')

0 commit comments

Comments
 (0)