From 160667b6a97eca95ae350be377c52cb06d857b9b Mon Sep 17 00:00:00 2001 From: Jan Lindemann Date: Sat, 4 Apr 2020 11:29:14 +0200 Subject: [PATCH] StringTree: Re-implement __str__() Signed-off-by: Jan Lindemann --- tools/python/jwutils/stree/StringTree.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/python/jwutils/stree/StringTree.py b/tools/python/jwutils/stree/StringTree.py index fe9f015..72a9da4 100644 --- a/tools/python/jwutils/stree/StringTree.py +++ b/tools/python/jwutils/stree/StringTree.py @@ -83,6 +83,9 @@ class StringTree: # export self.children[nibble].children[content] = StringTree('', content=content) return self.children[nibble] + def __str__(self): + return 'st:"{}"'.format(self.content) + def __getitem__(self, path): r = self.get(path) if r is None: