Skip to content

Commit

Permalink
Trap switching of pretext-to-tpf "-a" and "-p" arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
jgrg committed Oct 18, 2024
1 parent 919d500 commit 84d5670
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/tola/assembly/scripts/pretext_to_tpf.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,14 @@ def cli(
parse_assembly_file(assembly_file, "TPF")
)
prtxt_asm = parse_assembly_file(pretext_file, "AGP")

# Trap "-a" and "-p" arguments being switched
if not prtxt_asm.bp_per_texel:
exit(
f"No bp_per_texel value in the PretextView AGP file '{pretext_file}'\n"
"(Are the -a, --assembly and -p, --pretext arguments the right way around?)"
)

out_name = output_file.stem if output_file else "stdout"
build_asm = BuildAssembly(
out_name,
Expand Down

0 comments on commit 84d5670

Please sign in to comment.