From 938ee9f92bf15816247ac7180d432ba91a99eb69 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Mon, 23 Nov 2015 18:24:08 -0800 Subject: normalize.py: Don't use HTMLParseError. It has been removed as of python 3.5. Closes #380. --- test/normalize.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test') 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 -- cgit v1.2.3