From 3e5ff78d0466a21ba6a3d971be6029fc086f2f20 Mon Sep 17 00:00:00 2001 From: pnookala-godaddy Date: Mon, 30 Mar 2026 10:06:01 -0700 Subject: [PATCH] fix: remove dead code guard (if i is None) in spend_logs retry handler --- litellm/proxy/utils.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/litellm/proxy/utils.py b/litellm/proxy/utils.py index 33a08c403f7..8d2be47a359 100644 --- a/litellm/proxy/utils.py +++ b/litellm/proxy/utils.py @@ -4664,8 +4664,6 @@ class ProxyUpdateSpend: # Randomized backoff to reduce repeated collisions across pods await asyncio.sleep(random.uniform(2**i, 2**(i+1))) except Exception as e: - if i is None: - i = 0 if _is_deadlock_error(e) and i < n_retry_times: verbose_proxy_logger.warning( "Spend tracking - deadlock writing spend logs, "