# HG changeset patch # User Mads Kiilerich # Date 2015-03-11 00:24:25 # Node ID d4b1b40b41ace4e0bd1b509cd6e4521950934a17 # Parent e5bc21e78370123495dc5a57eecc84f2aca13d8d db: fix beaker caching key of (invalid) unicode email addresses It would crash with UnicodeDecodeError in beaker when trying to retrieve the user by email. diff --git a/kallithea/lib/caching_query.py b/kallithea/lib/caching_query.py --- a/kallithea/lib/caching_query.py +++ b/kallithea/lib/caching_query.py @@ -176,7 +176,7 @@ def _set_cache_parameters(query, region, "for region %r namespace %r" % (region, namespace) ) - query._cache_parameters = region, namespace, cache_key + query._cache_parameters = region, safe_str(namespace), cache_key class FromCache(MapperOption):