aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/misc/config.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/app/misc/config.py b/app/misc/config.py
new file mode 100644
index 0000000..34096f6
--- /dev/null
+++ b/app/misc/config.py
@@ -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") \ No newline at end of file