From 3f360e62ea16752f282dd22c87f7adbdbd23f955 Mon Sep 17 00:00:00 2001 From: Faster Speeding Date: Thu, 19 Nov 2020 06:27:36 +0000 Subject: [PATCH] Fix max_retries validation --- yuyo/backoff.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yuyo/backoff.py b/yuyo/backoff.py index 3a221fcd7..03862e297 100644 --- a/yuyo/backoff.py +++ b/yuyo/backoff.py @@ -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(