Fix #5080 (catch UnicodeDecodeError when converting CHM)

This commit is contained in:
Kovid Goyal 2010-03-08 09:44:46 -07:00
commit cfccd4e79f

View File

@ -19,6 +19,8 @@ def _clean(s):
def _detag(tag): def _detag(tag):
str = u"" str = u""
if tag is None:
return str
for elem in tag: for elem in tag:
if hasattr(elem, "contents"): if hasattr(elem, "contents"):
str += _detag(elem) str += _detag(elem)