Skip to content

Commit

Permalink
Added a dummy class for HTMLParserError; refs #23763.
Browse files Browse the repository at this point in the history
  • Loading branch information
timgraham committed Nov 5, 2014
1 parent 9f4c718 commit b07aa52
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion django/utils/html_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@
(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):
Expand Down

0 comments on commit b07aa52

Please sign in to comment.