From 08045442e28b69c5bec05fe8d1939d35ec38264a Mon Sep 17 00:00:00 2001 From: Jan Lindemann Date: Sun, 6 Oct 2024 17:04:25 +0200 Subject: [PATCH] StringTree: Fix exception in child_list() child_list() throws an exception saying that has no to_list() method. No, it hasn't. No idea how this has even worked at all, ever. Signed-off-by: Jan Lindemann --- tools/python/jwutils/stree/StringTree.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/python/jwutils/stree/StringTree.py b/tools/python/jwutils/stree/StringTree.py index 66321af..50c59ed 100644 --- a/tools/python/jwutils/stree/StringTree.py +++ b/tools/python/jwutils/stree/StringTree.py @@ -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)