mirror of
https://github.com/mwpenny/portal64-still-alive.git
synced 2024-10-19 22:27:36 -04:00
Have subtitle generation script fail loudly when it fails
This commit is contained in:
parent
189133c1fe
commit
7ea13d6c2b
|
@ -292,8 +292,7 @@ def make_overall_subtitles_sourcefile(language_list):
|
|||
|
||||
def read_translation_file(filepath, encoding='utf-16-le'):
|
||||
if not exists(filepath):
|
||||
print(f"not found {filepath}")
|
||||
return [], [], ''
|
||||
raise Exception(f"not found {filepath}")
|
||||
|
||||
lines = []
|
||||
|
||||
|
@ -333,7 +332,6 @@ def process_all_closecaption_files(dir, language_names):
|
|||
for language_name in language_names:
|
||||
filename = f"closecaption_{language_name}.txt"
|
||||
|
||||
try:
|
||||
filepath = os.path.join(dir, filename)
|
||||
|
||||
k,v,l = read_translation_file(filepath)
|
||||
|
@ -379,11 +377,6 @@ def process_all_closecaption_files(dir, language_names):
|
|||
'name': l,
|
||||
})
|
||||
print(filename, " - PASSED")
|
||||
except Exception as e:
|
||||
print(e)
|
||||
print(filename, " - FAILED")
|
||||
raise
|
||||
continue
|
||||
|
||||
good_characters = get_supported_characters()
|
||||
used_characters = set()
|
||||
|
|
Loading…
Reference in a new issue