mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 14:22:46 +00:00
Fixing many bugs in v2
* delegate_to rudimentary support (still needs much more work) * lots of other things
This commit is contained in:
@@ -43,6 +43,8 @@ def secure_hash_s(data, hash_func=sha1):
|
||||
|
||||
digest = hash_func()
|
||||
try:
|
||||
if not isinstance(data, basestring):
|
||||
data = "%s" % data
|
||||
digest.update(data)
|
||||
except UnicodeEncodeError:
|
||||
digest.update(data.encode('utf-8'))
|
||||
|
||||
Reference in New Issue
Block a user