Commit 4e9dee60 by James Cammarata

Use StringIO to feed md5 calculation to prevent unicode issues

Fixes #4014
parent 2a47f721
......@@ -393,8 +393,9 @@ def merge_hash(a, b):
def md5s(data):
''' Return MD5 hex digest of data. '''
buf = StringIO.StringIO(data)
digest = _md5()
digest.update(data.encode('utf-8'))
digest.update(buf.read())
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