Skip to content

Commit 2b7fd9b

Browse files
committed
Warn about exceptions thrown in template tags
1 parent 4dca3de commit 2b7fd9b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

user_sessions/templatetags/user_sessions.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,8 @@ def location(value):
102102
if location['city']:
103103
return '{}, {}'.format(location['city'], location['country_name'])
104104
return location['country_name']
105-
except:
106-
pass
105+
except Exception as e:
106+
warnings.warn(str(e))
107107
return None
108108

109109

0 commit comments

Comments
 (0)