[Python-modules-commits] [python-django] 06/16: Added a dummy class for HTMLParserError.
Brian May
bam at moszumanska.debian.org
Sun Oct 11 02:44:11 UTC 2015
This is an automated email from the git hooks/post-receive script.
bam pushed a commit to branch debian/sid
in repository python-django.
commit d7371c714045ad04e8c289b5948992eccb988c8e
Author: Brian May <brian at microcomaustralia.com.au>
Date: Sun Oct 11 12:12:44 2015 +1100
Added a dummy class for HTMLParserError.
Fix problem introduced by python-3.5 and causes FTBFS for several Django
related packages.
Backport of upstream fix.
https://github.com/django/django/commit/b07aa52e8a8e4c7fdc7265f75ce2e7992e657ae9
Closes: #796104
---
django/utils/html_parser.py | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/django/utils/html_parser.py b/django/utils/html_parser.py
index efe5422..ab1f654 100644
--- a/django/utils/html_parser.py
+++ b/django/utils/html_parser.py
@@ -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):
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-django.git
More information about the Python-modules-commits
mailing list