Skip to content

Commit 06b2202

Browse files
authored
retrieve the message from the reprcrash object (#28)
As the traceback chain proves to be unreliable?
1 parent 327614c commit 06b2202

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

parse_logs.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ def _(report: TestReport):
8989
if isinstance(report.longrepr, str):
9090
message = report.longrepr
9191
else:
92-
message = report.longrepr.chain[0][1].message
92+
message = report.longrepr.reprcrash.message
9393
return PreformattedReport(message=message, **parsed)
9494

9595

@@ -110,7 +110,7 @@ def _(report: CollectReport):
110110
if isinstance(report.longrepr, str):
111111
message = report.longrepr.split("\n")[-1].removeprefix("E").lstrip()
112112
else:
113-
message = report.longrepr.chain[0][1].message
113+
message = report.longrepr.reprcrash.message
114114
return PreformattedReport(message=message, **parsed)
115115

116116

0 commit comments

Comments
 (0)