From 9e85e3a25c65dff66a52adf00208fa202fd62f34 Mon Sep 17 00:00:00 2001 From: yolain Date: Sat, 10 Aug 2024 22:15:34 +0800 Subject: [PATCH] Fix web_version not found --- __init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index cfb0ddb..bb5324d 100644 --- a/__init__.py +++ b/__init__.py @@ -72,8 +72,10 @@ if os.path.isfile(config_path): with open(config_path, 'w') as f: yaml.dump(data, f) directory = f"./web_version/v1" - else: + elif "WEB_VERSION" in data: directory = f"./web_version/{data['WEB_VERSION']}" + else: + directory = f"./web_version/v1" if not os.path.exists(os.path.join(cwd_path, directory)): print(f"Web version {data['WEB_VERSION']} not found, using default") directory = f"./web_version/v1"