From d34baee8262c0e74ea3aaf142f9f570449e9787e Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Sun, 8 Aug 2010 20:55:58 +0000 Subject: [PATCH] Fixed a bug. git-svn-id: file:///home/phd/archive/SVN/bookmarks_db/trunk@245 fdd5c36f-1aea-0310-aeeb-c58d7e2b6c23 --- Robots/parse_html.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Robots/parse_html.py b/Robots/parse_html.py index fd8dc92..66400b5 100755 --- a/Robots/parse_html.py +++ b/Robots/parse_html.py @@ -35,11 +35,9 @@ def recode_entities(title, charset): if part not in ("&", "<", ">", """) and \ entity_re.match(part): _part = name2codepoint.get(part[1:-1], None) - if _part is None: - _part = part - else: - _part = unichr(_part).encode(charset) - output.append(_part) + if _part is not None: + part = unichr(_part).encode(charset) + output.append(part) title = ''.join(output) output = [] -- 2.39.5