diff options
author | John MacFarlane <jgm@berkeley.edu> | 2015-11-23 18:24:08 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2015-11-23 18:24:08 -0800 |
commit | 938ee9f92bf15816247ac7180d432ba91a99eb69 (patch) | |
tree | 84224d7f1415a2d6993ec0503f5ae92078c4d3c6 | |
parent | f63b610c015d356c403861686c0687edfaf17289 (diff) |
normalize.py: Don't use HTMLParseError.
It has been removed as of python 3.5.
Closes #380.
-rw-r--r-- | test/normalize.py | 4 |
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 |