13 lines
262 B
Python
13 lines
262 B
Python
|
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")
|