mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
DOCX Input: Fix error when converting documents that have images pointing to web resources. Fixes #1659142 [DocX to ePub conversion fault (Error Code: 1)](https://bugs.launchpad.net/calibre/+bug/1659142)
This commit is contained in:
parent
6cccd2efd3
commit
05b97d86e0
@ -134,7 +134,10 @@ class Images(object):
|
||||
with open(src, 'rb') as rawsrc:
|
||||
raw = rawsrc.read()
|
||||
else:
|
||||
try:
|
||||
raw = self.docx.read(fname)
|
||||
except KeyError:
|
||||
raise LinkedImageNotFound(fname)
|
||||
base = base or image_filename(fname.rpartition('/')[-1]) or 'image'
|
||||
ext = what(None, raw) or base.rpartition('.')[-1] or 'jpeg'
|
||||
if ext == 'emf':
|
||||
|
Loading…
x
Reference in New Issue
Block a user