##// END OF EJS Templates
Fix failure on Py2.6
Jonathan Frederic -
Show More
@@ -61,7 +61,11 b' def html_text(element):'
61
61
62 Analog of jQuery's $(element).text()
62 Analog of jQuery's $(element).text()
63 """
63 """
64 if not isinstance(element, (ElementTree.ElementTree, ElementTree.Element)):
64 instance_element_tree = isinstance(ElementTree.ElementTree, Type) and
65 isinstance(element, (ElementTree.ElementTree))
66 instance_element = isinstance(ElementTree.Element, Type) and
67 isinstance(element, (ElementTree.Element))
68 if not (instance_element or instance_element_tree):
65 element = ElementTree.fromstring(element)
69 element = ElementTree.fromstring(element)
66
70
67 text = element.text or ""
71 text = element.text or ""
General Comments 0
You need to be logged in to leave comments. Login now