Commit 0cfaabf9 by James Cammarata

Make sure unicode params don't break logging in modules

parent 788ac511
......@@ -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']
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment