Added a dummy class for HTMLParserError; refs #23763.

This commit is contained in:
Tim Graham 2014-11-04 20:56:00 -05:00
parent 9f4c718b2f
commit b07aa52e8a
1 changed files with 6 additions and 1 deletions

View File

@ -9,7 +9,12 @@ use_workaround = (
(current_version >= (3, 0) and current_version < (3, 2, 3))
)
HTMLParseError = _html_parser.HTMLParseError
try:
HTMLParseError = _html_parser.HTMLParseError
except AttributeError:
# create a dummy class for Python 3.5+ where it's been removed
class HTMLParseError(Exception):
pass
if not use_workaround:
if current_version >= (3, 4):