|
|
@ -496,7 +496,14 @@ class AnsibleCoreCI(object):
|
|
|
|
elif 'errorMessage' in response_json:
|
|
|
|
elif 'errorMessage' in response_json:
|
|
|
|
message = response_json['errorMessage'].strip()
|
|
|
|
message = response_json['errorMessage'].strip()
|
|
|
|
if 'stackTrace' in response_json:
|
|
|
|
if 'stackTrace' in response_json:
|
|
|
|
trace = '\n'.join([x.rstrip() for x in traceback.format_list(response_json['stackTrace'])])
|
|
|
|
traceback_lines = response_json['stackTrace']
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# AWS Lambda on Python 2.7 returns a list of tuples
|
|
|
|
|
|
|
|
# AWS Lambda on Python 3.7 returns a list of strings
|
|
|
|
|
|
|
|
if traceback_lines and isinstance(traceback_lines[0], list):
|
|
|
|
|
|
|
|
traceback_lines = traceback.format_list(traceback_lines)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
trace = '\n'.join([x.rstrip() for x in traceback_lines])
|
|
|
|
stack_trace = ('\nTraceback (from remote server):\n%s' % trace)
|
|
|
|
stack_trace = ('\nTraceback (from remote server):\n%s' % trace)
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
message = str(response_json)
|
|
|
|
message = str(response_json)
|
|
|
|