plugin XEP-0231, XEP-0264: fixed some remaining encoding issue following Python 3 port

This commit is contained in:
Goffi 2020-05-18 23:39:41 +02:00
commit 234bbcbdd5

View file

@ -131,7 +131,7 @@ class XEP_0264(object):
@param size(tuple(int)): requested size of thumbnail
@return (unicode): unique id for this image/size
"""
return hashlib.sha256(repr((image_uid, size))).hexdigest()
return hashlib.sha256(repr((image_uid, size)).encode()).hexdigest()
def _blockingGenThumb(self, source_path, size=None, max_age=None, image_uid=None):
"""Generate a thumbnail for image