From b36f7c60f21ff2b10afaed149fef6df1c6db80d4 Mon Sep 17 00:00:00 2001 From: dusk Date: Mon, 19 Feb 2024 19:30:20 +0100 Subject: [PATCH] Cleaner debugging --- src/orig.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/orig.py b/src/orig.py index fde14ae..f0e390c 100755 --- a/src/orig.py +++ b/src/orig.py @@ -1,6 +1,7 @@ #!/usr/bin/env python3 import os +import sys from unidecode import unidecode @@ -140,13 +141,11 @@ def write_translated(outfile, origfile, translation_file_paths): if line_should_be_translated(line): start, symbols = get_symbols(line) - print("\n-", debug_current_line, transfilepath, symbols) + print("\n-", debug_current_line, transfilepath, [start], symbols) outfile.write('`') outfile.write(start) - print([start]) - _printed_line_jp = start _printed_line_en = start while True: @@ -171,7 +170,8 @@ def write_translated(outfile, origfile, translation_file_paths): print("<", line, end='') if _printed_line_jp+'\n' != line: - raise Exception('UGABUNGA') + print("UGABUNGA") + sys.exit(1) # Used up all of the structures, this chapter has ended. # Got to the next one