diff --git a/tools/python/jwutils/Config.py b/tools/python/jwutils/Config.py index 8efe0c3..a204d58 100644 --- a/tools/python/jwutils/Config.py +++ b/tools/python/jwutils/Config.py @@ -113,7 +113,12 @@ class Config(): # export def branch(self, path: str): # type: ignore # Optional[Config]: FIXME: Don't know how to get hold of this type here if self.__conf: - return Config(tree=self.__conf.get(path), parent=self) # type: ignore + tree = self.__conf.get(path) + if tree is None: + msg = f'Tried to get non-existent branch "{path}" from config' + self.dump(ERR, msg) + throw(msg) + return Config(tree=tree, parent=self) # type: ignore return None def dump(self, prio: int, *args, **kwargs) -> None: