Mercurial > kallithea
changeset 8194:502d2fcbe434
py3: use str instead of safe_unicode when we just need a stable string for everything
author | Mads Kiilerich <mads@kiilerich.com> |
---|---|
date | Tue, 31 Dec 2019 15:39:17 +0100 |
parents | 89e9aef9b983 |
children | e35373106528 |
files | kallithea/lib/caching_query.py |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/kallithea/lib/caching_query.py Mon Feb 03 16:30:08 2020 +0100 +++ b/kallithea/lib/caching_query.py Tue Dec 31 15:39:17 2019 +0100 @@ -24,7 +24,7 @@ from sqlalchemy.orm.query import Query from sqlalchemy.sql import visitors -from kallithea.lib.utils2 import safe_str, safe_unicode +from kallithea.lib.utils2 import safe_str class CachingQuery(Query): @@ -141,7 +141,7 @@ args = _params_from_query(query) args.append(query._limit) args.append(query._offset) - cache_key = " ".join(safe_unicode(x) for x in args) + cache_key = " ".join(str(x) for x in args) if cache_key is None: raise Exception('Cache key cannot be None')