From 837cdcb95fc8662842ed803952a292d768d1f9e0 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 5 Jun 2014 11:49:34 +0530 Subject: [PATCH] Fix #1325709 [Private bug](https://bugs.launchpad.net/calibre/+bug/1325709) --- src/calibre/ebooks/oeb/polish/check/fonts.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/calibre/ebooks/oeb/polish/check/fonts.py b/src/calibre/ebooks/oeb/polish/check/fonts.py index 76f3b28510..67eee077b6 100644 --- a/src/calibre/ebooks/oeb/polish/check/fonts.py +++ b/src/calibre/ebooks/oeb/polish/check/fonts.py @@ -108,7 +108,10 @@ def check_fonts(container): sheets = [] for name, mt in container.mime_map.iteritems(): 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: for style in container.parsed(name).xpath('//*[local-name()="style"]'): if style.get('type', 'text/css') == 'text/css' and style.text: