moved reading config to misc

This commit is contained in:
Navan Chauhan 2020-09-27 11:10:52 +05:30
parent bb02df97a6
commit b4dae59394
1 changed files with 13 additions and 0 deletions

13
app/misc/config.py Normal file
View File

@ -0,0 +1,13 @@
import configparser
import sys
iniConfig = configparser.ConfigParser()
iniConfig.read('config.ini')
try:
iniConfig['DATABASE']
except KeyError:
try:
iniConfig.read("../config.ini")
except KeyError:
iniConfig.read("../../config.ini")