aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2015-11-23 18:24:08 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2015-11-23 18:24:08 -0800
commit938ee9f92bf15816247ac7180d432ba91a99eb69 (patch)
tree84224d7f1415a2d6993ec0503f5ae92078c4d3c6 /test
parentf63b610c015d356c403861686c0687edfaf17289 (diff)
normalize.py: Don't use HTMLParseError.
It has been removed as of python 3.5. Closes #380.
Diffstat (limited to 'test')
-rw-r--r--test/normalize.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/normalize.py b/test/normalize.py
index 70bee46..2bce2cc 100644
--- a/test/normalize.py
+++ b/test/normalize.py
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
-from html.parser import HTMLParser, HTMLParseError
+from html.parser import HTMLParser
from html.entities import name2codepoint
import sys
import re
@@ -175,6 +175,6 @@ def normalize_html(html):
parser.feed(chunk.group(0))
parser.close()
return parser.output
- except HTMLParseError as e:
+ except Exception as e:
sys.stderr.write("Normalization error: " + e.msg + "\n")
return html # on error, return unnormalized HTML