mirror of
https://github.com/ansible/awx.git
synced 2026-02-18 03:30:02 -03:30
fix case of Ansible v2 _result.cmd is list for release 2.4.5
This commit is contained in:
@@ -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>',
|
||||
|
||||
Reference in New Issue
Block a user