Commit 2bfc6f8d by Sébastien Eustace

Fix Python 2.7 compatibility

parent 4b3caa7e
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import re import re
from typing import List from typing import List
......
...@@ -9,7 +9,11 @@ except ImportError: ...@@ -9,7 +9,11 @@ except ImportError:
try: try:
from html import unescape from html import unescape
except ImportError: except ImportError:
try:
from html.parser import HTMLParser from html.parser import HTMLParser
except ImportError:
from HTMLParser import HTMLParser
unescape = HTMLParser().unescape unescape = HTMLParser().unescape
from typing import Generator from typing import Generator
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment