Skip to content

Commit 012e19b

Browse files
committed
Add support for python2.
My development install has a backport for html.parser so it didn't fail import but did in CI.
1 parent d380fbe commit 012e19b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

test/html_norm.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,10 @@
1818
tests.
1919
2020
"""
21-
from html.parser import HTMLParser
21+
try:
22+
from html.parser import HTMLParser
23+
except ImportError:
24+
from HTMLParser import HTMLParser # python2
2225

2326
try:
2427
from htmlentitydefs import name2codepoint

0 commit comments

Comments
 (0)