mirror of
https://github.com/django/django.git
synced 2025-10-26 15:16:09 +00:00
Added a dummy class for HTMLParserError; refs #23763.
This commit is contained in:
@@ -9,7 +9,12 @@ use_workaround = (
|
|||||||
(current_version >= (3, 0) and current_version < (3, 2, 3))
|
(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 not use_workaround:
|
||||||
if current_version >= (3, 4):
|
if current_version >= (3, 4):
|
||||||
|
|||||||
Reference in New Issue
Block a user