changeset 4898:d4b1b40b41ac

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.
author Mads Kiilerich <madski@unity3d.com>
date Wed, 11 Mar 2015 00:24:25 +0100
parents e5bc21e78370
children 9ee018948dcd
files kallithea/lib/caching_query.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/kallithea/lib/caching_query.py	Wed Mar 11 00:24:25 2015 +0100
+++ b/kallithea/lib/caching_query.py	Wed Mar 11 00:24:25 2015 +0100
@@ -176,7 +176,7 @@
                         "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):