From 03a641d4a1c2204158723233a8de18a879ef32d4 Mon Sep 17 00:00:00 2001 From: Mark Harrison Date: Wed, 24 Sep 2025 02:59:08 -0700 Subject: [PATCH] Remove token from log message on token_test error --- lib/lichess.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/lichess.py b/lib/lichess.py index 68faaed48..af4f1b281 100644 --- a/lib/lichess.py +++ b/lib/lichess.py @@ -75,6 +75,10 @@ def is_final(exception: Exception) -> bool: def backoff_handler(details: BackoffDetails) -> None: """Log exceptions inside functions with the backoff decorator.""" + args = details["args"] + kwargs = details["kwargs"] + if "token_test" in args: + kwargs["data"] = "" logger.debug("Backing off {wait:0.1f} seconds after {tries} tries " "calling function {target} with args {args} and kwargs {kwargs}".format(**details)) logger.debug(f"Exception: {traceback.format_exc()}")