From 7d2345ecae07e4b792c60f7d36fa78bb2dc69706 Mon Sep 17 00:00:00 2001 From: David Timber Date: Sat, 14 May 2022 17:54:44 +0800 Subject: Bug fixes ... - The script requiring Python 3.10 - execs and tasks not merging properly --- src/palhm/__init__.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src') 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) -- cgit v1.2.3-70-g09d2