Fix #6064 (Error on opening or converting html file)

This commit is contained in:
Kovid Goyal 2010-07-02 12:03:45 -06:00
parent cbaa8f6139
commit 684f51b959

View File

@ -844,7 +844,7 @@ class Manifest(object):
nroot = etree.fromstring('<html></html>')
has_body = False
for child in list(data):
if barename(child.tag) == 'body':
if isinstance(child.tag, (unicode, str)) and barename(child.tag) == 'body':
has_body = True
break
parent = nroot