Make exception printing a bit smarter

This commit is contained in:
James Cammarata 2015-06-19 22:58:53 -04:00
commit 0d92599d18
2 changed files with 16 additions and 2 deletions

View file

@ -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: