Ensure sidecar is not input or output file

This commit is contained in:
James R. Barlow
2021-03-05 00:29:42 -08:00
parent 25c8c4656f
commit 079c162a96
3 changed files with 14 additions and 1 deletions
+4
View File
@@ -112,6 +112,10 @@ def check_options_sidecar(options):
"--sidecar filename must be specified when output file is stdout."
)
options.sidecar = options.output_file + '.txt'
if options.sidecar == options.input_file or options.sidecar == options.output_file:
raise BadArgsError(
"--sidecar file must be different from the input and output files"
)
def check_options_preprocessing(options):