Merge pull request #5225 from tk0miya/5213_pyspecific

Fix #5213: i18n: sphinx-build crashes if node having tupled-attributed
This commit is contained in:
Takeshi KOMIYA
2018-07-29 20:27:44 +09:00
committed by GitHub

View File

@@ -56,7 +56,10 @@ def repr_domxml(node, length=80):
returns full of DOM XML representation.
:return: DOM XML representation
"""
text = node.asdom().toxml()
try:
text = node.asdom().toxml()
except Exception:
text = text_type(node)
if length and len(text) > length:
text = text[:length] + '...'
return text