From c4f134d694753b9f1893bc2e25f1b1b5a248b10f Mon Sep 17 00:00:00 2001 From: "James R. Barlow" Date: Fri, 28 Aug 2015 04:48:29 -0700 Subject: [PATCH] Prevent running validation on missing file after an exception is thrown --- ocrmypdf/main.py | 1 + 1 file changed, 1 insertion(+) diff --git a/ocrmypdf/main.py b/ocrmypdf/main.py index 2660ba28..f77b3923 100755 --- a/ocrmypdf/main.py +++ b/ocrmypdf/main.py @@ -899,6 +899,7 @@ def run_pipeline(): return eval( exc_value, {'ExitCode': ExitCode}, {'exc_value': exc_value}) + return ExitCode.other_error if not validate_pdfa(options.output_file, _log): _log.warning('Output file: The generated PDF/A file is INVALID')