From 8b9f29ae52b1420d44c6c330128a89158ef470db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Dlouh=C3=BD?= Date: Fri, 5 Jan 2018 21:51:02 +0100 Subject: [PATCH] Python3: fix unichr() in htmlparser --- linkcheck/HtmlParser/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/linkcheck/HtmlParser/__init__.py b/linkcheck/HtmlParser/__init__.py index a99ec6a8..b3bcbc66 100644 --- a/linkcheck/HtmlParser/__init__.py +++ b/linkcheck/HtmlParser/__init__.py @@ -165,6 +165,7 @@ try: from htmlentitydefs import name2codepoint except ImportError: from html.entities import name2codepoint +from builtins import chr def _resolve_entity (mo): @@ -193,7 +194,7 @@ def _resolve_entity (mo): # unknown entity -> ignore return u'' try: - return unichr(num) + return chr(num) except ValueError: return u''