From 3229d765f70e6f4ba958f9b118e413f8fd3541de Mon Sep 17 00:00:00 2001 From: Vladyslav Hroshev Date: Tue, 25 Mar 2025 19:01:08 +0200 Subject: [PATCH] Fixed installation if in versions folder is missing css subfolder Finally the single test was really useful --- scripts/utils/generate_file.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/utils/generate_file.py b/scripts/utils/generate_file.py index 311accf..57079a6 100644 --- a/scripts/utils/generate_file.py +++ b/scripts/utils/generate_file.py @@ -27,9 +27,10 @@ def generate_file(folder, temp_folder, final_file): version_path = os.path.join(base_path, version_folder) css_path = os.path.join(version_path, '.css') - for css_file in os.listdir(css_path): - with open(os.path.join(css_path, css_file)) as f: - opened_file.write(f.read() + '\n') + if os.path.exists(css_path): + for css_file in os.listdir(css_path): + with open(os.path.join(css_path, css_file)) as f: + opened_file.write(f.read() + '\n') for file in os.listdir(version_path): if file.endswith('.svg'):