Fix #7455 (Converting Mobipocket PRC to ePUB - missing pictures)

This commit is contained in:
Kovid Goyal 2010-11-12 09:40:38 -07:00
parent f135bdbff0
commit bfdb4cf108

View File

@ -569,6 +569,10 @@ class MobiReader(object):
for attr in self.IMAGE_ATTRS:
recindex = attrib.pop(attr, None) or recindex
if recindex is not None:
try:
recindex = '%05d'%int(recindex)
except:
pass
attrib['src'] = 'images/%s.jpg' % recindex
for attr in ('width', 'height'):
if attr in attrib: