From a6b4d59d94eac344d6dbfb64823715decb3fba12 Mon Sep 17 00:00:00 2001 From: cmdr2 Date: Sat, 10 Sep 2022 00:29:46 +0530 Subject: [PATCH] Fix unnecessary warning for config.json --- ui/server.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ui/server.py b/ui/server.py index 5e92a201..3fff7a9c 100644 --- a/ui/server.py +++ b/ui/server.py @@ -148,6 +148,9 @@ def getAppConfig(): try: config_json_path = os.path.join(CONFIG_DIR, 'config.json') + if not os.path.exists(config_json_path): + return HTTPException(status_code=500, detail="No config file") + with open(config_json_path, 'r') as f: config_json_str = f.read() config = json.loads(config_json_str)