forked from rDrama/rDrama
don't want to crash on our precious logging code
parent
ba6e4721d3
commit
992e4a0d1c
|
@ -23,11 +23,11 @@ def calc_users(v):
|
||||||
print("calc_users called with missing context data")
|
print("calc_users called with missing context data")
|
||||||
if request:
|
if request:
|
||||||
print(f"while serving {request.method} {request.full_path}")
|
print(f"while serving {request.method} {request.full_path}")
|
||||||
print(f"user agent: {g.agent}")
|
print(f"user agent: {getattr(g, 'agent', '-attribute not present-')}")
|
||||||
else:
|
else:
|
||||||
print("no request context")
|
print("no request context")
|
||||||
print(f"v: {v}")
|
print(f"v: {v}")
|
||||||
print(f"db?: {bool(g.db)}")
|
print(f"db?: {bool(getattr(g, 'db', None))}")
|
||||||
# end temp logging code
|
# end temp logging code
|
||||||
loggedin = cache.get(f'{SITE}_loggedin') or {}
|
loggedin = cache.get(f'{SITE}_loggedin') or {}
|
||||||
loggedout = cache.get(f'{SITE}_loggedout') or {}
|
loggedout = cache.get(f'{SITE}_loggedout') or {}
|
||||||
|
|
Loading…
Reference in New Issue