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:
parent
788ac51185
commit
0cfaabf9cb
1 changed files with 4 additions and 1 deletions
|
@ -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']
|
||||
|
|
Loading…
Reference in a new issue