mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-27 15:11:23 -07:00
Make exception printing a bit smarter
This commit is contained in:
parent
a77b58e351
commit
0d92599d18
2 changed files with 16 additions and 2 deletions
|
@ -405,7 +405,7 @@ class ActionBase:
|
|||
# not valid json, lets try to capture error
|
||||
data = dict(failed=True, parsed=False)
|
||||
if 'stderr' in res and res['stderr'].startswith('Traceback'):
|
||||
data['traceback'] = res['stderr']
|
||||
data['exception'] = res['stderr']
|
||||
else:
|
||||
data['msg'] = res.get('stdout', '')
|
||||
if 'stderr' in res:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue