From c63a3c116f171e61319cffb63eda0ecfda116814 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Sun, 27 Nov 2022 01:08:44 +0200 Subject: [PATCH] Revert "don't want to crash on our precious logging code" This reverts commit 992e4a0d1c192777427936057dd0e5685d4986ac. --- files/routes/wrappers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/files/routes/wrappers.py b/files/routes/wrappers.py index a4cf350df..ea2ec57b6 100644 --- a/files/routes/wrappers.py +++ b/files/routes/wrappers.py @@ -23,11 +23,11 @@ def calc_users(v): print("calc_users called with missing context data") if request: print(f"while serving {request.method} {request.full_path}") - print(f"user agent: {getattr(g, 'agent', '-attribute not present-')}") + print(f"user agent: {g.agent}") else: print("no request context") print(f"v: {v}") - print(f"db?: {bool(getattr(g, 'db', None))}") + print(f"db?: {bool(g.db)}") # end temp logging code loggedin = cache.get(f'{SITE}_loggedin') or {} loggedout = cache.get(f'{SITE}_loggedout') or {}