Commit 14df904a authored by David Trattnig's avatar David Trattnig
Browse files

Section for defaults. #43

parent f4a9627f
......@@ -45,15 +45,19 @@ class AuraConfig:
Args:
ini_path(String): The path to the configuration file `engine.ini`
"""
self.logger = logging.getLogger("AuraEngine")
config_file = Path(ini_path)
if not config_file.is_file():
ini_path = "%s/configuration/engine.ini" % Path(__file__).parent.parent.parent.absolute()
self.ini_path = ini_path
self.set("config_dir", os.path.dirname(ini_path))
self.logger = logging.getLogger("AuraEngine")
self.load_config()
# Defaults
self.set("config_dir", os.path.dirname(ini_path))
self.set("install_dir", os.path.realpath(__file__ + "../../../.."))
self.set("use_test_data", False) # TODO Still needed?
def set(self, key, value):
......@@ -133,9 +137,6 @@ class AuraConfig:
v = config_parser.get(section, key).replace('"', '').strip()
self.set(key, v)
# Custom overrides and defaults
self.set("install_dir", os.path.realpath(__file__ + "../../../.."))
self.set("use_test_data", False)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment