From ca13ac07ab3c29d7ca17de15c6c052e0edd057eb Mon Sep 17 00:00:00 2001 From: jwansek Date: Wed, 26 Nov 2025 14:24:10 +0000 Subject: Fixed whispa parsing --- edaweb/database.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'edaweb/database.py') diff --git a/edaweb/database.py b/edaweb/database.py index 49ec33c..c6553a6 100644 --- a/edaweb/database.py +++ b/edaweb/database.py @@ -20,8 +20,11 @@ class Database: passwd:str = None def __enter__(self): + config_path = os.path.join(os.path.dirname(__file__), "..", "edaweb.conf") + if not os.path.exists(config_path): + raise FileNotFoundError("Could not find edaweb.conf config file") self.config = configparser.ConfigParser(interpolation = None) - self.config.read(os.path.join(os.path.dirname(__file__), "edaweb.conf")) + self.config.read(config_path) if self.safeLogin: self.__connection = pymysql.connect( -- cgit v1.2.3