Commit 21f5bc42 by Andrey Shorin

Prevent UnicodeEncodeError: 'ascii' codec can't encode characters in position…

Prevent UnicodeEncodeError: 'ascii' codec can't encode characters in position ...: ordinal not in range(128)
parent 776fc044
......@@ -410,7 +410,7 @@ def md5s(data):
buf = StringIO.StringIO(data)
digest = _md5()
digest.update(buf.read())
digest.update(buf.read().encode('utf-8'))
return digest.hexdigest()
def md5(filename):
......
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