Prevent UnicodeEncodeError: 'ascii' codec can't encode characters in position ...: ordinal not in range(128)

pull/4221/head
Andrey Shorin 11 years ago
parent 776fc044dd
commit 21f5bc4242

@ -410,7 +410,7 @@ def md5s(data):
buf = StringIO.StringIO(data) buf = StringIO.StringIO(data)
digest = _md5() digest = _md5()
digest.update(buf.read()) digest.update(buf.read().encode('utf-8'))
return digest.hexdigest() return digest.hexdigest()
def md5(filename): def md5(filename):

Loading…
Cancel
Save