From cb8ed088fa01958184e7df085b2a37eb6c1e0cac Mon Sep 17 00:00:00 2001 From: Alexandre Flament Date: Sat, 7 Oct 2023 11:24:29 +0000 Subject: [PATCH] Replace self._retries >= 0 by self._retries > 0 --- searx/network/context.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/searx/network/context.py b/searx/network/context.py index b480749bf..99a335024 100644 --- a/searx/network/context.py +++ b/searx/network/context.py @@ -243,7 +243,7 @@ class NetworkContextRetryFunction(NetworkContext): def call(self, func: Callable[P, R], *args: P.args, **kwargs: P.kwargs) -> R: try: - while self._retries >= 0 and self.get_remaining_time() > 0: + while self._retries > 0 and self.get_remaining_time() > 0: self._set_http_client() try: return func(*args, **kwargs) # type: ignore