summaryrefslogtreecommitdiff
path: root/kvmd/apps
diff options
context:
space:
mode:
authorAdam Outler <[email protected]>2023-06-19 22:35:53 -0400
committerGitHub <[email protected]>2023-06-20 05:35:53 +0300
commitdb3f6220238da8138c670924a074477987790fbe (patch)
tree66a086a240d6f44485e9dc460dbc1fe5b326dbf5 /kvmd/apps
parent9879a9f05b07d329b8db140e58d78f6005b2d76a (diff)
Refactoring merge Method into a New Class & Adding Unit Tests (#137)
Diffstat (limited to 'kvmd/apps')
-rw-r--r--kvmd/apps/__init__.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/kvmd/apps/__init__.py b/kvmd/apps/__init__.py
index 04f88ffa..31847bc3 100644
--- a/kvmd/apps/__init__.py
+++ b/kvmd/apps/__init__.py
@@ -53,6 +53,7 @@ from ..yamlconf import Option
from ..yamlconf import build_raw_from_options
from ..yamlconf.dumper import make_config_dump
from ..yamlconf.loader import load_yaml_file
+from ..yamlconf.merger import yaml_merge
from ..validators.basic import valid_stripped_string
from ..validators.basic import valid_stripped_string_not_empty
@@ -177,8 +178,8 @@ def _init_config(config_path: str, override_options: list[str], **load_flags: bo
scheme = _get_config_scheme()
try:
- tools.merge(raw_config, (raw_config.pop("override", {}) or {}))
- tools.merge(raw_config, build_raw_from_options(override_options))
+ yaml_merge(raw_config, (raw_config.pop("override", {}) or {}))
+ yaml_merge(raw_config, build_raw_from_options(override_options), "raw command line options")
_patch_raw(raw_config)
config = make_config(raw_config, scheme)