mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Fixing bug with unicode templates.
The utils.md5s() function would break when calculating checksums for non-ascii characters. Convert to utf-8 first.
This commit is contained in:
parent
c1b63d1500
commit
7a8b27f716
2 changed files with 2 additions and 2 deletions
|
@ -301,7 +301,7 @@ def md5s(data):
|
|||
''' Return MD5 hex digest of data. '''
|
||||
|
||||
digest = _md5()
|
||||
digest.update(data)
|
||||
digest.update(data.encode('utf-8'))
|
||||
return digest.hexdigest()
|
||||
|
||||
def md5(filename):
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Are you pondering what I'm pondering?
|
||||
Are you pondering what I'm pøndering?
|
||||
|
||||
I think so Brain, but {{ answer }}
|
||||
|
||||
|
|
Loading…
Reference in a new issue