diff options
author | David Timber <dxdt@dev.snart.me> | 2022-05-14 17:54:44 +0800 |
---|---|---|
committer | David Timber <dxdt@dev.snart.me> | 2022-05-14 18:14:38 +0800 |
commit | 7d2345ecae07e4b792c60f7d36fa78bb2dc69706 (patch) | |
tree | dd6adca546efb7b8766062cd3a7b3ed92aeb1eae | |
parent | 0ba6810750d53f4d677f26a5a17c1406cd9bc3f2 (diff) |
Bug fixes ...
- The script requiring Python 3.10
- execs and tasks not merging properly
-rw-r--r-- | src/palhm/__init__.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/palhm/__init__.py b/src/palhm/__init__.py index 7e5afb4..c227a3e 100644 --- a/src/palhm/__init__.py +++ b/src/palhm/__init__.py @@ -711,7 +711,11 @@ def merge_conf (a: dict, b: dict) -> dict: if c: raise KeyError("Dup tasks", c) - return a | b + ret = a | b + ret["execs"] = a.get("execs", []) + b.get("execs", []) + ret["tasks"] = a.get("tasks", []) + b.get("tasks", []) + + return ret def load_jsonc (path: str) -> dict: with open(path) as in_file: @@ -727,7 +731,7 @@ def load_jsonc (path: str) -> dict: def load_conf (path: str, inc_set: set = set()) -> dict: JSONC_EXT = ".jsonc" - rpath = os.path.realpath(path, strict = True) + rpath = os.path.realpath(path) if rpath in inc_set: raise RecursionError("Config already included", rpath) inc_set.add(rpath) |