recoveryfile
This commit is contained in:
23
main.py
23
main.py
@@ -30,16 +30,19 @@ am = None
|
||||
bm = None
|
||||
user = None
|
||||
|
||||
def initializeProgram():
|
||||
global am, bad_config, bm, user
|
||||
dbconf = config.getConfig()['database']
|
||||
DbManager(dbconf)
|
||||
bad_config = False
|
||||
bm = BusinessModel()
|
||||
user = UserManager()
|
||||
am = AddressModel()
|
||||
|
||||
publishContext()
|
||||
def initializeProgram(conf_ok):
|
||||
if conf_ok:
|
||||
global am, bad_config, bm, user
|
||||
dbconf = config.getConfig()['database']
|
||||
DbManager(dbconf)
|
||||
bad_config = False
|
||||
bm = BusinessModel()
|
||||
user = UserManager()
|
||||
am = AddressModel()
|
||||
publishContext()
|
||||
else:
|
||||
# TODO: show message and exit program
|
||||
print("Kein Zugriff auf die Datenbank")
|
||||
|
||||
def publishContext():
|
||||
global engine
|
||||
|
||||
Reference in New Issue
Block a user