1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

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

This commit is contained in:
Andrey Shorin 2013-09-24 16:14:20 +04:00
parent 776fc044dd
commit 21f5bc4242

View file

@ -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):