From d4f1b3ed9a740aafba3762d572eb02c3fb0553ab Mon Sep 17 00:00:00 2001 From: Broque Thomas Date: Wed, 7 Jan 2026 08:47:30 -0800 Subject: [PATCH] Add fallback for legacy config loading Adds a check for the presence of 'load_config' in config_manager. If not found, uses a fallback method to support older settings.py files, improving compatibility with legacy Docker volumes. --- web_server.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/web_server.py b/web_server.py index f8c47016..72eb02c9 100644 --- a/web_server.py +++ b/web_server.py @@ -59,7 +59,13 @@ else: if os.path.exists(config_path): print(f"Found config file at: {config_path}") # Load configuration into the existing singleton instance - config_manager.load_config(config_path) + if hasattr(config_manager, 'load_config'): + config_manager.load_config(config_path) + else: + # Fallback for older settings.py in Docker volumes + print("⚠️ Legacy configuration detected: using fallback loading method") + config_manager.config_path = Path(config_path) + config_manager._load_config() print("✅ Web server configuration loaded successfully.") else: print(f"🔴 WARNING: config.json not found at {config_path}. Using default settings.")