more py3 porting

This commit is contained in:
j 2014-09-03 01:09:42 +02:00
commit de68f4c4c4
7 changed files with 21 additions and 15 deletions

View file

@ -39,7 +39,7 @@ def find(data):
if 'group' in q:
names = {}
groups = {}
key = 'group:' + hashlib.sha1(json.dumps(data)).hexdigest()
key = 'group:' + hashlib.sha1(json.dumps(data).encode('utf-8')).hexdigest()
g = state.cache.get(key)
if g is None:
items = [i.id for i in q['qs'].options(load_only('id'))]