More argument checking

This commit is contained in:
James R. Barlow
2018-11-15 15:59:38 -08:00
parent 07b638a394
commit 622f2c4bab
+5
View File
@@ -545,6 +545,11 @@ def check_options_ocr_behavior(options, log):
raise argparse.ArgumentError(
None,
"Error: choose only one of --force-ocr, --skip-text, --redo-ocr.")
if options.force_ocr and any((options.mask_barcodes, options.threshold)):
raise argparse.ArgumentError(
'--force-ocr',
'Error: --force-ocr currently may not be used with --threshold or --mask-barcodes'
)
def check_options_optimizing(options, log):