mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
DOCX Output: Fix conversion failing if the input document has missing images. See #1926025 (Conversion from EPUB to PDF failed)
This commit is contained in:
parent
4a54f217df
commit
456e2e7e41
@ -51,7 +51,11 @@ class ImagesManager(object):
|
||||
def read_image(self, href):
|
||||
if href not in self.images:
|
||||
item = self.oeb.manifest.hrefs.get(href) or self.oeb.manifest.hrefs.get(urlquote(href))
|
||||
if item is None or not isinstance(item.data, bytes):
|
||||
try:
|
||||
if item is None or not isinstance(item.data, bytes):
|
||||
self.log.warning('Failed to find image:', href)
|
||||
return
|
||||
except FileNotFoundError:
|
||||
self.log.warning('Failed to find image:', href)
|
||||
return
|
||||
try:
|
||||
|
Loading…
x
Reference in New Issue
Block a user