mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-python
synced 2026-01-15 01:52:56 +01:00
StringTree: Fix exception in child_list()
child_list() throws an exception saying that <str> has no to_list() method. No, it hasn't. No idea how this has even worked at all, ever. Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
f6cdd395da
commit
08045442e2
1 changed files with 3 additions and 2 deletions
|
|
@ -184,9 +184,10 @@ class StringTree: # export
|
|||
if depth_first == False:
|
||||
raise Exception("tried to retrieve child list with breadth-first search, not yet implemented")
|
||||
r = []
|
||||
for c in self.children:
|
||||
for name, c in self.children.items():
|
||||
r.append(c)
|
||||
r.extend(c.to_list())
|
||||
r.extend(c.child_list())
|
||||
return r
|
||||
|
||||
def dump(self, prio: int, *args, **kwargs) -> None:
|
||||
caller = kwargs['caller'] if 'caller' in kwargs.keys() else get_caller_pos(1)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue