From 7b2064221eaab1f74b014b0c7eb064df5b45d69d Mon Sep 17 00:00:00 2001 From: "Marshall T. Vandegrift" Date: Mon, 2 Feb 2009 11:41:00 -0500 Subject: [PATCH] Fix bug in reconstituting NCX @id and @class attributes. --- src/calibre/ebooks/oeb/base.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/calibre/ebooks/oeb/base.py b/src/calibre/ebooks/oeb/base.py index 9ba5d95899..d17973b88e 100644 --- a/src/calibre/ebooks/oeb/base.py +++ b/src/calibre/ebooks/oeb/base.py @@ -900,9 +900,9 @@ class TOC(object): def to_ncx(self, parent, depth=1): for node in self.nodes: - id = self.id or unicode(uuid.uuid4()) + id = node.id or unicode(uuid.uuid4()) attrib = {'id': id, 'playOrder': '0'} - if self.klass: + if node.klass: attrib['class'] = node.klass point = element(parent, NCX('navPoint'), attrib=attrib) label = etree.SubElement(point, NCX('navLabel'))