From d62f12ebef9069178987a19a6803761b69996c69 Mon Sep 17 00:00:00 2001 From: DevilXD Date: Wed, 8 Jun 2022 16:24:17 +0200 Subject: [PATCH] Censour out the user's password from the traceback --- twitch.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/twitch.py b/twitch.py index c24c2c9..5c14828 100644 --- a/twitch.py +++ b/twitch.py @@ -879,6 +879,8 @@ class Twitch: cause = exc if attempt < attempts - 1: await asyncio.sleep(0.1 * attempt) + if "json" in kwargs and "password" in kwargs["json"]: + kwargs["json"]["password"] = "..." raise RequestException( "Ran out of attempts while handling a request: " f"({method=}, {url=}, {attempts=}, {kwargs=})"