Fix leaked file handle for output_type none

This commit is contained in:
James R. Barlow
2021-10-28 02:50:17 -07:00
parent a63a21a7fc
commit 21279f5784
+3 -3
View File
@@ -290,10 +290,10 @@ def exec_concurrent(context: PdfContext, executor: Executor):
# Copy text file to destination
copy_final(text, options.sidecar, context)
if options.output_type != 'none':
# Merge layers to one single pdf
pdf = ocrgraft.finalize()
# Merge layers to one single pdf
pdf = ocrgraft.finalize()
if options.output_type != 'none':
# PDF/A and metadata
log.info("Postprocessing...")
pdf = post_process(pdf, context, executor)