mirror of
https://github.com/ansible/awx.git
synced 2026-01-17 12:41:19 -03:30
Merge pull request #1058 from AlanCoding/1025_ansible_v2_err_release245
Fix warning caused by Ansible v2 callback dictionary
This commit is contained in:
commit
56b8696641
@ -77,6 +77,8 @@ def censor(obj, no_log=False):
|
||||
if k in obj:
|
||||
new_obj[k] = obj[k]
|
||||
if k == 'cmd' and k in obj:
|
||||
if isinstance(obj['cmd'], list):
|
||||
obj['cmd'] = ' '.join(obj['cmd'])
|
||||
if re.search(r'\s', obj['cmd']):
|
||||
new_obj['cmd'] = re.sub(r'^(([^\s\\]|\\\s)+).*$',
|
||||
r'\1 <censored>',
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user