Skip to content

Commit

Permalink
retrieve the message from the reprcrash object (#28)
Browse files Browse the repository at this point in the history
As the traceback chain proves to be unreliable?
  • Loading branch information
keewis authored Dec 4, 2023
1 parent 327614c commit 06b2202
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions parse_logs.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def _(report: TestReport):
if isinstance(report.longrepr, str):
message = report.longrepr
else:
message = report.longrepr.chain[0][1].message
message = report.longrepr.reprcrash.message
return PreformattedReport(message=message, **parsed)


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


Expand Down

0 comments on commit 06b2202

Please sign in to comment.