This commit is contained in:
Kovid Goyal 2014-06-05 11:49:34 +05:30
parent 83110cb730
commit 837cdcb95f

View File

@ -108,7 +108,10 @@ def check_fonts(container):
sheets = [] sheets = []
for name, mt in container.mime_map.iteritems(): for name, mt in container.mime_map.iteritems():
if mt in OEB_STYLES: if mt in OEB_STYLES:
sheets.append((name, container.parsed(name), None)) try:
sheets.append((name, container.parsed(name), None))
except Exception:
pass # Could not parse, ignore
elif mt in OEB_DOCS: elif mt in OEB_DOCS:
for style in container.parsed(name).xpath('//*[local-name()="style"]'): for style in container.parsed(name).xpath('//*[local-name()="style"]'):
if style.get('type', 'text/css') == 'text/css' and style.text: if style.get('type', 'text/css') == 'text/css' and style.text: