Fix nasty recursion bug.

This commit is contained in:
Marshall T. Vandegrift 2009-07-06 13:15:15 -04:00
parent 6ad3575579
commit 07bc32118b

View File

@ -1954,7 +1954,7 @@ class MobiWriter(object):
first = False first = False
else : else :
self._oeb.logger.info('Generating flat CTOC ...') self._oeb.logger.info('Generating flat CTOC ...')
for (i, child) in enumerate(toc.iter()): for (i, child) in enumerate(toc.iterdescendants()):
# Only add chapters or articles at depth==1 # Only add chapters or articles at depth==1
# no class defaults to 'chapter' # no class defaults to 'chapter'
if child.klass is None : child.klass = 'chapter' if child.klass is None : child.klass = 'chapter'