Skip to content
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.

Commit

Permalink
Update some of the log output formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
ms-christensen committed Aug 11, 2019
1 parent 74c47dc commit 1356190
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,17 +58,15 @@ def convert_resource(id: str, resource_type: str) -> str:
elif resource_type == "url":
trans = lbp_print.UrlResource(id)
else:
raise ValueError(
f"Trying to convert resource {id} of illegal type {resource_type}"
)
update_status(f"Identified and downloaded resource {id}.", job)
raise ValueError(f"Trying to convert {id} of illegal type {resource_type}")
update_status(f"Identified and downloaded {id}.", job)

update_status(f"Converting resource to pdf.", job)
update_status(f"Converting {id} to pdf.", job)
try:
filename = lbp_print.Tex(trans).process(output_format="pdf")
except SaxonError as exc:
update_status(str(exc), job)
raise
update_status(f"Successfully converted {id} to pdf.", job)

update_status(f"Successfully converted resource {id} to pdf.", job)
return filename

0 comments on commit 1356190

Please sign in to comment.