aboutsummaryrefslogtreecommitdiff
path: root/src/palhm
diff options
context:
space:
mode:
authorDavid Timber <dxdt@dev.snart.me>2022-05-14 17:54:44 +0800
committerDavid Timber <dxdt@dev.snart.me>2022-05-14 18:14:38 +0800
commit7d2345ecae07e4b792c60f7d36fa78bb2dc69706 (patch)
treedd6adca546efb7b8766062cd3a7b3ed92aeb1eae /src/palhm
parent0ba6810750d53f4d677f26a5a17c1406cd9bc3f2 (diff)
Bug fixes ...
- The script requiring Python 3.10 - execs and tasks not merging properly
Diffstat (limited to 'src/palhm')
-rw-r--r--src/palhm/__init__.py8
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)