From d30c41b03d5a9473751dff2a2b285ade39547071 Mon Sep 17 00:00:00 2001 From: Jan Lindemann Date: Mon, 12 May 2025 18:57:16 +0200 Subject: [PATCH] stree.StringTree.py.__set(): Disable assert self.content != str(content) There's an assertion in StringTree.py.__set(), assert self.content != str(content), which often triggers. Not sure what the idea behind the assertion was, disable it. Signed-off-by: Jan Lindemann --- tools/python/jwutils/stree/StringTree.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/python/jwutils/stree/StringTree.py b/tools/python/jwutils/stree/StringTree.py index 64e46e9..6addf13 100644 --- a/tools/python/jwutils/stree/StringTree.py +++ b/tools/python/jwutils/stree/StringTree.py @@ -65,7 +65,7 @@ class StringTree: # export def __set(self, path_, content, split=True): slog(DEBUG, ('At "{}": '.format(str(self.content)) if hasattr(self, "content") else "") + f'Setting "{path_}" -> "{content}"') - assert self.content != str(content) + #assert self.content != str(content) # Not sure what the idea behind this was. It often goes off, and all works fine without. if content is not None and not type(content) in [str, StringTree]: raise Exception("Tried to add content of unsupported type {}".format(type(content).__name__)) if path_ is None: