From ed9729a8262f03288373f4138e8d03d338809653 Mon Sep 17 00:00:00 2001 From: Chandan CH Date: Mon, 8 May 2023 11:28:30 +0530 Subject: [PATCH] add missing double quote Opening double quote was missed during the recent hence, showing the below error: auth.split(b":", 1)[0].decode(UTF-8", "replace") SyntaxError: unterminated string literal (detected at line 472) --- gunicorn/glogging.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gunicorn/glogging.py b/gunicorn/glogging.py index 60745f98..4e5fbbd5 100644 --- a/gunicorn/glogging.py +++ b/gunicorn/glogging.py @@ -469,7 +469,7 @@ class Logger(object): # so we need to convert it to a byte string auth = base64.b64decode(auth[1].strip().encode('utf-8')) # b64decode returns a byte string - auth.split(b":", 1)[0].decode(UTF-8", "replace") + auth.split(b":", 1)[0].decode("UTF-8", "replace") except (TypeError, binascii.Error, UnicodeDecodeError) as exc: self.debug("Couldn't get username: %s", exc) return user