Skip to content

Commit

Permalink
Script: improve communication of XSL processing log
Browse files Browse the repository at this point in the history
  • Loading branch information
rbeezer committed Mar 5, 2024
1 parent 7aef3b1 commit 512775a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion pretext/pretext.py
Original file line number Diff line number Diff line change
Expand Up @@ -3564,7 +3564,6 @@ def transform():
texc = e

try:
outputfn("comprehensive messages, warnings, and errors:")
parse_t = threading.Thread(target=transform)
parse_t.start()
still_alive = True
Expand All @@ -3574,6 +3573,13 @@ def transform():
still_alive = parse_t.is_alive()

end = len(xslt.error_log)

# if there are any messages and we are just
# starting out, produce an explanatory line
# start will be reset to non-zero, so this is
# one-time only, and never if there are no messages
if (start == 0) and (end > 0):
outputfn("messages from the log for XSL processing (indented):")
# print out any unprinted messages from error_log
for line in range(start, end):
outputfn(f" * {xslt.error_log[line].message}")
Expand Down

0 comments on commit 512775a

Please sign in to comment.