Skip to content

Commit

Permalink
Fix max_retries validation
Browse files Browse the repository at this point in the history
  • Loading branch information
FasterSpeeding committed Nov 19, 2020
1 parent f264d4e commit 3f360e6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion yuyo/backoff.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ def __init__(
jitter_multiplier: float = 1.0,
initial_increment: int = 0,
) -> None:
if max_retries < 1:
if max_retries is not None and max_retries < 1:
raise ValueError("max_retries must be greater than 1")

self._backoff = rate_limits.ExponentialBackOff(
Expand Down

0 comments on commit 3f360e6

Please sign in to comment.