Fix #821635 (rtf to mobi coversion regression in 0.8.13)

This commit is contained in:
Kovid Goyal 2011-08-05 14:35:58 -06:00
parent 99fec62ddc
commit 902a50c711

View File

@ -1710,7 +1710,6 @@ class MobiWriter(object):
''' '''
from calibre.ebooks.oeb.base import TOC from calibre.ebooks.oeb.base import TOC
items = list(self._oeb.toc.iterdescendants()) items = list(self._oeb.toc.iterdescendants())
items = [i for i in items if i.depth == 1]
offsets = {i:self._id_offsets.get(i.href, -1) for i in items if i.href} offsets = {i:self._id_offsets.get(i.href, -1) for i in items if i.href}
items = [i for i in items if offsets[i] > -1] items = [i for i in items if offsets[i] > -1]
items.sort(key=lambda i:offsets[i]) items.sort(key=lambda i:offsets[i])