Cleanup ghostscript error output

This commit is contained in:
James R. Barlow
2019-05-17 00:50:29 -07:00
parent 0cb4e854e5
commit c1af0fb18d
+2 -4
View File
@@ -164,8 +164,7 @@ def rasterize_pdf(
log.debug(p.stdout)
if p.returncode != 0:
log.error('Ghostscript rasterizing failed')
raise SubprocessOutputError()
raise SubprocessOutputError('Ghostscript rasterizing failed')
tmp.seek(0)
with Image.open(tmp) as im:
@@ -287,5 +286,4 @@ def generate_pdfa(
# PDF/A - check PDF/A status elsewhere
copy(gs_pdf.name, fspath(output_file))
else:
log.error('Ghostscript PDF/A rendering failed')
raise SubprocessOutputError()
raise SubprocessOutputError('Ghostscript PDF/A rendering failed')