e-book viewer: Ignore missing items inthe spine, instead of erroring out

This commit is contained in:
Kovid Goyal 2009-12-14 09:30:22 -07:00
parent 7c0a3e2e46
commit 5843fa524a

View File

@ -195,7 +195,10 @@ class EbookIterator(object):
mt = self.opf.manifest.type_for_id(i.idref) mt = self.opf.manifest.type_for_id(i.idref)
if mt is None: if mt is None:
mt = guess_type(spath)[0] mt = guess_type(spath)[0]
self.spine.append(SpineItem(spath, mime_type=mt)) try:
self.spine.append(SpineItem(spath, mime_type=mt))
except:
self.log.warn('Missing spine item:', repr(spath))
cover = self.opf.cover cover = self.opf.cover
if self.ebook_ext in ('lit', 'mobi', 'prc', 'opf') and cover: if self.ebook_ext in ('lit', 'mobi', 'prc', 'opf') and cover: