From 6a3557bae74052c73b5267c3699e086b351770ef Mon Sep 17 00:00:00 2001 From: David Cruciani Date: Tue, 15 Oct 2024 14:18:45 +0200 Subject: [PATCH] fix: [launch] check conf file --- website/app/utils/utils.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/website/app/utils/utils.py b/website/app/utils/utils.py index 27109093..0bb100ff 100644 --- a/website/app/utils/utils.py +++ b/website/app/utils/utils.py @@ -8,7 +8,11 @@ import configparser config = configparser.ConfigParser() CONF_PATH = os.path.join(os.getcwd(), "conf", "config.cfg") -config.read(CONF_PATH) +if os.path.isfile(CONF_PATH): + config.read(CONF_PATH) +else: + print("[-] No conf file found. Copy config.cfg.sample to config.cfg") + exit() MODULES = []