Notice to GitKraken users: A vulnerability has been found in the SSH key generation of GitKraken versions 7.6.0 to 8.0.0 (https://www.gitkraken.com/blog/weak-ssh-key-fix). If you use GitKraken and have generated a SSH key using one of these versions, please remove it both from your local workstation and from your LRZ GitLab profile.

21.10.2021, 9:00 - 11:00: Due to updates GitLab may be unavailable for some minutes between 09:00 and 11:00.

Commit 6b244b8c authored by di68kap's avatar di68kap
Browse files

- hotfix: DHParser/syntaxtree.py Node.content property

parent 1f3beb8f
......@@ -362,14 +362,15 @@ class Node: # (collections.abc.Sized): Base class omitted for cython-compatibil
string content of the child-nodes is recursively read and then
concatenated.
"""
if self._content is None:
if self.children:
self._content = "".join(child.content for child in self.children)
else:
# self._content = self._result
self._content = str(self._result)
self._result = self._content # self._result might be more efficient as a string!?
return self._content
return "".join(child.content for child in self.children) if self.children else str(self._result)
# if self._content is None:
# if self.children:
# self._content = "".join(child.content for child in self.children)
# else:
# # self._content = self._result
# self._content = str(self._result)
# self._result = self._content # self._result might be more efficient as a string!?
# return self._content
#
#
# @content.setter
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment