Split CFG.py to private/lib/cfgparse.py

feature-admin-split
Darksider3 5 years ago
parent 192e70e4a2
commit 8c3ac4060f

@ -1,12 +1,6 @@
import configparser import lib.cfgparse
import logging
import lib.uis.default as default_cmd
args = default_cmd.argparser.parse_args() args = lib.cfgparse.args
CONF_FILE = args.config CONF_FILE = lib.cfgparse.CONF_FILE
config = configparser.ConfigParser() config = lib.cfgparse.config
config.read(CONF_FILE) REG_FILE = lib.cfgparse.REG_FILE
logging.basicConfig(format="%(asctime)s: %(message)s",
level=int(config['LOG_LEVEL']['log_level'])
)
REG_FILE = config['DEFAULT']['applications_db']

@ -0,0 +1,12 @@
import configparser
import logging
import lib.uis.default as default_cmd
args = default_cmd.argparser.parse_args()
CONF_FILE = args.config
config = configparser.ConfigParser()
config.read(CONF_FILE)
logging.basicConfig(format="%(asctime)s: %(message)s",
level=int(config['LOG_LEVEL']['log_level'])
)
REG_FILE = config['DEFAULT']['applications_db']
Loading…
Cancel
Save