Skip to content

Commit e5b123e

Browse files
committed
Fix assertion in etree treewalker, thereby making tests pass again.
1 parent 6f7bb4a commit e5b123e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

html5lib/treewalkers/etree.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55

66
import re
77

8+
from six import text_type
9+
810
from . import _base
911
from ..utils import moduleFactoryFactory
1012

@@ -49,7 +51,7 @@ def getNodeDetails(self, node):
4951
return _base.COMMENT, node.text
5052

5153
else:
52-
assert type(node.tag) in (str, str), type(node.tag)
54+
assert type(node.tag) == text_type, type(node.tag)
5355
#This is assumed to be an ordinary element
5456
match = tag_regexp.match(node.tag)
5557
if match:

0 commit comments

Comments
 (0)