From 7773df744326567d3b22c4e653505a83d1da7014 Mon Sep 17 00:00:00 2001 From: Ludy Date: Thu, 21 Nov 2024 22:18:41 +0100 Subject: [PATCH] Fix: Convert a single string in the array to a list array (#2293) --- .github/scripts/check_language_properties.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/scripts/check_language_properties.py b/.github/scripts/check_language_properties.py index 8cb3320d..4bb88fdd 100644 --- a/.github/scripts/check_language_properties.py +++ b/.github/scripts/check_language_properties.py @@ -123,8 +123,10 @@ def check_for_missing_keys(reference_file, file_list, branch): def read_properties(file_path): - with open(file_path, "r", encoding="utf-8") as file: - return file.read().splitlines() + if (os.path.isfile(file_path) and os.path.exists(file_path)): + with open(file_path, "r", encoding="utf-8") as file: + return file.read().splitlines() + return [""] def check_for_differences(reference_file, file_list, branch, actor): @@ -140,10 +142,11 @@ def check_for_differences(reference_file, file_list, branch, actor): only_reference_file = True - for file_path in file_list: + for file_path in file_list[0].split(): basename_current_file = os.path.basename(branch + "/" + file_path) if ( basename_current_file == basename_reference_file + or not file_path.startswith("src/main/resources/messages_") or not file_path.endswith(".properties") or not basename_current_file.startswith("messages_") ):