From 77efb4b339dabcd3f2c0164b5e5d576e6819ee92 Mon Sep 17 00:00:00 2001 From: Darksider3 Date: Sat, 19 Oct 2019 14:21:46 +0200 Subject: [PATCH] delete cfgparse again and get it going as it where before --- private/lib/CFG.py | 16 +++++++++++----- private/lib/cfgparse.py | 12 ------------ 2 files changed, 11 insertions(+), 17 deletions(-) delete mode 100644 private/lib/cfgparse.py diff --git a/private/lib/CFG.py b/private/lib/CFG.py index 55d2a71..bb10f35 100644 --- a/private/lib/CFG.py +++ b/private/lib/CFG.py @@ -1,6 +1,12 @@ -import lib.cfgparse +import configparser +import logging +import lib.uis.default as default_cmd -args = lib.cfgparse.args -CONF_FILE = lib.cfgparse.CONF_FILE -config = lib.cfgparse.config -REG_FILE = lib.cfgparse.REG_FILE \ No newline at end of file +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'] diff --git a/private/lib/cfgparse.py b/private/lib/cfgparse.py deleted file mode 100644 index bb10f35..0000000 --- a/private/lib/cfgparse.py +++ /dev/null @@ -1,12 +0,0 @@ -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']