From 4a06653dd01aa248b41549093be108470286bebe Mon Sep 17 00:00:00 2001 From: nobbie2009 Date: Mon, 20 Jul 2020 11:34:58 +0200 Subject: [PATCH] Update boswatch.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit -Auslagerung der Filter in 2. Datei -hinzufügen einer globalen Variable für den Testbetrieb - Dadurch können Filter getestet werden ohne diese ständig eingeschaltet zu haben --- boswatch.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/boswatch.py b/boswatch.py index 9e63beb..3c0221d 100755 --- a/boswatch.py +++ b/boswatch.py @@ -156,7 +156,9 @@ try: logging.debug("BOSWatch given arguments") if args.test: logging.debug(" - Test-Mode!") - + globalVars.testvariable = 1 + else: + globalVars.testvariable = 0 logging.debug(" - Frequency: %s", converter.freqToHz(args.freq)) logging.debug(" - Device: %s", args.device) logging.debug(" - PPM Error: %s", args.error) @@ -202,7 +204,7 @@ try: try: logging.debug("reading config file") globals.config = ConfigParser.ConfigParser() - globals.config.read(globals.script_path+"/config/config.ini") + globalVars.config.read([globalVars.script_path+"/config/config.ini", "/var/www/html/config_filter.ini"]) # if given loglevel is debug: if globals.config.getint("BOSWatch","loglevel") == 10: logging.debug(" - BOSWatch:")