mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-python
synced 2026-01-15 09:53:32 +01:00
stree.StringTree.find(): Add method
StringTree.find(key, val) (and Config.find(), for that matter) returns a list of paths with sections containing children matching key / val pairs. One of them can be None, which acts as a wildcard. Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
a9fa274bb1
commit
b464f20e6c
2 changed files with 78 additions and 1 deletions
|
|
@ -158,3 +158,9 @@ class Config(): # export
|
|||
@property
|
||||
def name(self):
|
||||
return self.__conf.content
|
||||
|
||||
def find(self, key: str|None, val: str|None, match:StringTree.Match=StringTree.Match.Equal) -> list[str]:
|
||||
return self.__conf.find(key, val, match=match)
|
||||
|
||||
#def __getattr__(self, name: str):
|
||||
# return getattr(self.__conf, name)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue