Return a distinct error code if PDF/A fails

This commit is contained in:
James R. Barlow
2018-07-03 16:59:03 -07:00
parent 47885f4230
commit e44001641c
4 changed files with 25 additions and 20 deletions
+1 -1
View File
@@ -936,7 +936,7 @@ def run_pipeline():
else:
msg = 'Output file is okay but is not PDF/A (seems to be {})'
_log.warning(msg.format(pdfa_info['conformance']))
return ExitCode.invalid_output_pdf
return ExitCode.pdfa_conversion_failed
if not qpdf.check(options.output_file, _log):
_log.warning('Output file: The generated PDF is INVALID')
return ExitCode.invalid_output_pdf
+1
View File
@@ -29,6 +29,7 @@ class ExitCode(IntEnum):
child_process_error = 7
encrypted_pdf = 8
invalid_config = 9
pdfa_conversion_failed = 10
other_error = 15
ctrl_c = 130