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

Make sure unicode params don't break logging in modules

This commit is contained in:
James Cammarata 2014-02-17 13:37:48 -06:00
parent 788ac51185
commit 0cfaabf9cb

View file

@ -780,7 +780,10 @@ class AnsibleModule(object):
else:
found = False
for filter in filter_re:
m = filter.match(str(self.params[param]))
if isinstance(self.params[param], unicode):
m = filter.match(self.params[param])
else:
m = filter.match(str(self.params[param]))
if m:
d = m.groupdict()
log_args[param] = d['before'] + "********" + d['after']