changeset 35cecb228573 in trypod:default
details: https://hg.tryton.org/trypod?cmd=changeset;node=35cecb228573
description:
Encode email to compute avatar digest
diffstat:
trypod.py | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diffs (12 lines):
diff -r bc762a11878d -r 35cecb228573 trypod.py
--- a/trypod.py Sun Oct 18 15:33:27 2020 +0200
+++ b/trypod.py Wed Oct 21 23:20:36 2020 +0200
@@ -351,6 +351,8 @@
def avatar(email):
+ if isinstance(email, str):
+ email = email.encode('utf-8')
digest = hashlib.md5(email.strip()).hexdigest()
return 'https://www.gravatar.com/avatar/' + digest