Fix #2835 (Cover images not being sent to Kindle and mobi files not converting)

This commit is contained in:
Kovid Goyal 2009-07-13 18:08:42 -06:00
parent 7afc38ba2c
commit f930919523

View File

@ -1957,6 +1957,12 @@ class MobiWriter(object):
# Test to see if this child's offset is the same as the previous child's
# offset, skip it
h = child.href
first = False
if h is None:
self._oeb.logger.warn(' Ignoring TOC entry with no href:',
child.title)
continue
currentOffset = self._id_offsets[h]
# print "_generate_ctoc: child offset: 0x%X" % currentOffset
@ -1967,7 +1973,6 @@ class MobiWriter(object):
else :
self._oeb.logger.warn(" Ignoring redundant href: %s in '%s'" % (h, child.title))
first = False
else :
if self.opts.verbose > 2 :
self._oeb.logger.info("skipping class: %s depth %d at position %d" % \