Skip to content

Commit

Permalink
Fix check in get_dictionaries function in from_template module
Browse files Browse the repository at this point in the history
  • Loading branch information
insolor committed Dec 1, 2024
1 parent 832020e commit 0ec5595
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion df_translation_toolkit/create_mod/from_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@ def get_dictionaries(translation_path: Path, language: str) -> Dictionaries:
for file in translation_path.glob(f"*{po_file}*{language}.po"):
if file.is_file() and file.stat().st_mtime > mtime:
po_files[po_file] = file
if not po_files[po_file].is_file():

if po_file not in po_files:
msg = f"Unable to find {po_file} po file for language {language}"
raise ValueError(msg)

Expand Down

0 comments on commit 0ec5595

Please sign in to comment.