Commit 92748cd8 authored by Michal Čihař's avatar Michal Čihař

Compatibility with python 3 (base64)

Signed-off-by: default avatarMichal Čihař <michal@cihar.com>
parent a33a4d7d
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
from __future__ import unicode_literals from __future__ import unicode_literals
from base64 import b64encode
import sys import sys
import hashlib import hashlib
import os.path import os.path
...@@ -57,7 +58,7 @@ def avatar_for_email(email, size=80): ...@@ -57,7 +58,7 @@ def avatar_for_email(email, size=80):
# Retrieve from cache # Retrieve from cache
cache_key = 'avatar-{0}-{1}'.format( cache_key = 'avatar-{0}-{1}'.format(
email.encode('base64').strip(), b64encode(email.encode('utf-8')).strip(),
size size
) )
cache = caches['default'] cache = caches['default']
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment