diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2021-11-03 16:27:12 -0700 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2021-11-03 16:52:44 -0700 |
commit | 7bf6db7237345c678a890ebbf500392d5d0ad505 (patch) | |
tree | d7147cce58adf58183e5fa0487be8415f707faef | |
parent | b1c7d258e04b2b044d17ce465aea1082d7a6ff08 (diff) | |
download | fatcat-7bf6db7237345c678a890ebbf500392d5d0ad505.tar.gz fatcat-7bf6db7237345c678a890ebbf500392d5d0ad505.zip |
web: fix bytes/text warning logging
Minor issue. Caught by type checking
-rw-r--r-- | python/fatcat_web/auth.py | 6 |
1 files changed, 3 insertions, 3 deletions
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"] |