new settings class

This commit is contained in:
WorldTeacher
2024-09-11 15:39:06 +02:00
parent a72d76b94e
commit 95d3de6490
4 changed files with 110 additions and 44 deletions

View File

@@ -1,10 +1,9 @@
import omegaconf
import sys
# import argparse
__version__ = "0.0.1"
__author__ = "Alexander Kirchner"
config = omegaconf.OmegaConf.load("config/settings.yaml")
import sys
from config import Config
config = Config("config/settings.yaml")
# if programm launched with argument --debug, set debug to True
if "--debug" in sys.argv:
@@ -12,6 +11,7 @@ if "--debug" in sys.argv:
# if programm launched with argument --log, set log_debug
if "--log" in sys.argv:
config.log_debug = True
# arguments = argparse.ArgumentParser(
# prog="Ausleihsystem",