mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
MOBI Output: When processing an input document that specifies non-existant files in the OPF guide, don't crash. Fixes #6490 (Unable to convert epub to Mobi in Calibre)
This commit is contained in:
parent
042f67b12e
commit
6c62990878
@ -185,7 +185,7 @@ class Serializer(object):
|
||||
buffer.write('<guide>')
|
||||
for ref in self.oeb.guide.values():
|
||||
path = urldefrag(ref.href)[0]
|
||||
if hrefs[path].media_type not in OEB_DOCS:
|
||||
if path not in hrefs or hrefs[path].media_type not in OEB_DOCS:
|
||||
continue
|
||||
|
||||
buffer.write('<reference type="')
|
||||
|
Loading…
x
Reference in New Issue
Block a user