diff options
| author | jwansek <eddie.atten.ea29@gmail.com> | 2025-11-26 14:24:10 +0000 |
|---|---|---|
| committer | jwansek <eddie.atten.ea29@gmail.com> | 2025-11-26 14:24:10 +0000 |
| commit | ca13ac07ab3c29d7ca17de15c6c052e0edd057eb (patch) | |
| tree | d24d14ad89d34bbb83f4381a6f7355b879cb9d5b /edaweb/database.py | |
| parent | c1fdf1926972c387be0d4714b3c7e1a349b1ae68 (diff) | |
| download | boymoder.blog-ca13ac07ab3c29d7ca17de15c6c052e0edd057eb.tar.gz boymoder.blog-ca13ac07ab3c29d7ca17de15c6c052e0edd057eb.zip | |
Fixed whispa parsing
Diffstat (limited to 'edaweb/database.py')
| -rw-r--r-- | edaweb/database.py | 5 |
1 files changed, 4 insertions, 1 deletions
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( |
