Skip to content

Commit c3cca61

Browse files
committed
Tweak message
1 parent c2d1d79 commit c3cca61

1 file changed

Lines changed: 2 additions & 9 deletions

File tree

‎Lib/test/libregrtest/utils.py‎

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -207,19 +207,12 @@ def escape(text: str) -> str:
207207
def escape_property(text: str) -> str:
208208
return escape(text).replace(":", "%3A").replace(",", "%2C")
209209

210-
message = decolor(message).rstrip()
210+
message = decolor(message)
211211
props: dict[str, str | int] = {}
212-
header = title
213212
if location := traceback_location(message):
214213
props |= location
215-
position = ":".join(str(location[key])
216-
for key in ("file", "line", "col")
217-
if key in location)
218-
header = f"{position}: {title}"
219214
props["title"] = title
220-
# The job log only shows the message, not the properties: start the
221-
# message with the location and the title
222-
message = f"{header}\n{traceback_exception(message).strip()}"
215+
message = traceback_exception(message).strip()
223216
props_text = ",".join(f"{key}={escape_property(str(value))}"
224217
for key, value in props.items())
225218
return f"::error {props_text}::{escape(message)}"

0 commit comments

Comments
 (0)