Skip to content
Snippets Groups Projects
Commit 14df904a authored by David Trattnig's avatar David Trattnig
Browse files

Section for defaults. #43

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