ghostscript: log errors from stdout

This commit is contained in:
James R. Barlow
2016-10-27 15:36:20 -07:00
parent 18ae5db06d
commit 7d2009ccef

View File

@@ -29,7 +29,10 @@ def rasterize_pdf(input_file, output_file, xres, yres, raster_device, log,
universal_newlines=True)
stdout, stderr = p.communicate()
if stdout:
log.debug(stdout)
if 'error' in stdout:
log.error(stdout) # Ghostscript puts errors in stdout
else:
log.debug(stdout)
if stderr:
log.error(stderr)