From 7bf6db7237345c678a890ebbf500392d5d0ad505 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Wed, 3 Nov 2021 16:27:12 -0700 Subject: web: fix bytes/text warning logging Minor issue. Caught by type checking --- python/fatcat_web/auth.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'python/fatcat_web') diff --git a/python/fatcat_web/auth.py b/python/fatcat_web/auth.py index 2b3f5871..71afc0fb 100644 --- a/python/fatcat_web/auth.py +++ b/python/fatcat_web/auth.py @@ -119,11 +119,11 @@ def handle_ia_xauth(email: str, password: str) -> AnyResponse: ) ) except Exception: - app.log.warning("IA XAuth fail: {}".format(resp.content)) + app.log.warning("IA XAuth fail: {}".format(resp.text)) return render_template("auth_ia_login.html", email=email), resp.status_code elif resp.status_code != 200: flash("Internet Archive login failed (internal error?)") - app.log.warning("IA XAuth fail: {}".format(resp.content)) + app.log.warning("IA XAuth fail: {}".format(resp.text)) return render_template("auth_ia_login.html", email=email), resp.status_code # Successful login; now fetch info... @@ -139,7 +139,7 @@ def handle_ia_xauth(email: str, password: str) -> AnyResponse: ) if resp.status_code != 200: flash("Internet Archive login failed (internal error?)") - app.log.warning("IA XAuth fail: {}".format(resp.content)) + app.log.warning("IA XAuth fail: {}".format(resp.text)) return render_template("auth_ia_login.html", email=email), resp.status_code ia_info = resp.json()["values"] -- cgit v1.2.3