From 0ec5595be5615815f4c05b3359dfc77256b99421 Mon Sep 17 00:00:00 2001 From: insolor <2442833+insolor@users.noreply.github.com> Date: Sun, 1 Dec 2024 19:51:23 +0300 Subject: [PATCH] Fix check in get_dictionaries function in from_template module --- df_translation_toolkit/create_mod/from_template.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/df_translation_toolkit/create_mod/from_template.py b/df_translation_toolkit/create_mod/from_template.py index 89e3d1f..9ed3096 100644 --- a/df_translation_toolkit/create_mod/from_template.py +++ b/df_translation_toolkit/create_mod/from_template.py @@ -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)