[devtools] use self._parse so AssertionError is properly raised instead of lxml error (test failure introduced in 6711f78c18be)
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Wed, 15 May 2013 14:42:50 +0200
changeset 8979 8f5416b1562a
parent 8978 269548f2306e
child 8984 0f2fad7a92d4
[devtools] use self._parse so AssertionError is properly raised instead of lxml error (test failure introduced in 6711f78c18be)
devtools/htmlparser.py
--- a/devtools/htmlparser.py	Wed May 15 16:21:23 2013 +0200
+++ b/devtools/htmlparser.py	Wed May 15 14:42:50 2013 +0200
@@ -107,7 +107,7 @@
             return data
         # parse using transitional DTD
         data = data.replace(STRICT_DOCTYPE, TRANSITIONAL_DOCTYPE)
-        tree = etree.fromstring(data, self.parser)
+        tree = self._parse(data)
         namespace = tree.nsmap.get(None)
         # this is the list of authorized child tags for <blockquote> nodes
         expected = 'p h1 h2 h3 h4 h5 h6 div ul ol dl pre hr blockquote address ' \