Skip to content

Commit b5c082a

Browse files
committed
Fix html5lib#190: etree on Py2 shouldn't assert unicode strings.
1 parent c0a6375 commit b5c082a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

html5lib/treewalkers/etree.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
import re
1212

13-
from six import text_type
13+
from six import string_types
1414

1515
from . import _base
1616
from ..utils import moduleFactoryFactory
@@ -58,7 +58,7 @@ def getNodeDetails(self, node):
5858
return _base.COMMENT, node.text
5959

6060
else:
61-
assert type(node.tag) == text_type, type(node.tag)
61+
assert isinstance(node.tag, string_types), type(node.tag)
6262
# This is assumed to be an ordinary element
6363
match = tag_regexp.match(node.tag)
6464
if match:

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy