mirror of
https://github.com/BOSWatch/BW3-Core.git
synced 2026-04-05 14:25:45 +00:00
fix test config file location and paths
This commit is contained in:
parent
2ca62d90f2
commit
4b69b08028
7 changed files with 45 additions and 38 deletions
|
|
@ -50,7 +50,7 @@ class ConfigYAML:
|
|||
except FileNotFoundError:
|
||||
logging.error("config file not found: %s", configPath)
|
||||
except yaml.parser.ParserError:
|
||||
logging.exception("error in config file")
|
||||
logging.exception("syntax error in config file: %s", configPath)
|
||||
return False
|
||||
|
||||
def get(self, *args, default=None):
|
||||
|
|
|
|||
|
|
@ -17,25 +17,13 @@
|
|||
import logging
|
||||
import os
|
||||
import sys
|
||||
import platform
|
||||
|
||||
logging.debug("- %s loaded", __name__)
|
||||
|
||||
# note searching for root part is not a nice solution atm
|
||||
ROOT_PATH = os.path.dirname(sys.modules['boswatch'].__file__).replace("\\", "/") + "/../"
|
||||
|
||||
# implements a system adaption for the paths
|
||||
if platform.system() == "Linux":
|
||||
LOG_PATH = "/var/log/boswatch/"
|
||||
CONFIG_PATH = "/etc/opt/boswatch/"
|
||||
else:
|
||||
# FIXME LOG_PATH not used actually
|
||||
# path is fixed in logger config.ini
|
||||
LOG_PATH = ROOT_PATH + "log/"
|
||||
CONFIG_PATH = ROOT_PATH + "config/"
|
||||
|
||||
PLUGIN_PATH = ROOT_PATH + "plugin/"
|
||||
CSV_PATH = ROOT_PATH + "csv/"
|
||||
CONFIG_PATH = ROOT_PATH + "config/"
|
||||
BIN_PATH = ROOT_PATH + "_bin/"
|
||||
TEST_PATH = ROOT_PATH + "test/"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue