Fix NameError 'ghostscript'

This commit is contained in:
James R. Barlow
2018-04-12 21:24:05 -07:00
parent 9b731d63b8
commit 7fc897e6dc

View File

@@ -127,9 +127,10 @@ def generate_pdfa(pdf_pages, output_file, compression, log,
"-dAutoFilterGrayImages=true",
]
# Older versions of Ghostscript expect a leading slash, newer ones should
# not have it. See Ghostscript git commit fe1c025d.
strategy = 'RGB' if ghostscript.version() >= '9.19' else '/RGB'
# Older versions of Ghostscript expect a leading slash in
# sColorConversionStrategy, newer ones should not have it. See Ghostscript
# git commit fe1c025d.
strategy = 'RGB' if version() >= '9.19' else '/RGB'
with NamedTemporaryFile(delete=True) as gs_pdf:
args_gs = [