From 55808e5f68ef9c40020f4727f38668ed025cb546 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 18 May 2013 08:19:25 +0530 Subject: [PATCH] pep8 --- src/calibre/ebooks/oeb/transforms/split.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/calibre/ebooks/oeb/transforms/split.py b/src/calibre/ebooks/oeb/transforms/split.py index 5ba653aa66..0ca3888c17 100644 --- a/src/calibre/ebooks/oeb/transforms/split.py +++ b/src/calibre/ebooks/oeb/transforms/split.py @@ -113,7 +113,7 @@ class Split(object): for i, elem in enumerate(item.data.iter()): try: elem.set('pb_order', str(i)) - except TypeError: # Cant set attributes on comment nodes etc. + except TypeError: # Cant set attributes on comment nodes etc. continue page_breaks = list(page_breaks) @@ -171,7 +171,6 @@ class Split(object): return url - class FlowSplitter(object): 'The actual splitting logic' @@ -313,7 +312,6 @@ class FlowSplitter(object): split_point = root.xpath(path)[0] split_point2 = root2.xpath(path)[0] - def nix_element(elem, top=True): # Remove elem unless top is False in which case replace elem by its # children @@ -393,7 +391,6 @@ class FlowSplitter(object): buf = part return ans - def split_to_size(self, tree): self.log.debug('\t\tSplitting...') root = tree.getroot() @@ -440,7 +437,7 @@ class FlowSplitter(object): len(self.split_trees), size/1024.)) else: self.log.debug( - '\t\t\tSplit tree still too large: %d KB' % \ + '\t\t\tSplit tree still too large: %d KB' % (size/1024.)) self.split_to_size(t) @@ -546,7 +543,6 @@ class FlowSplitter(object): for x in toc: fix_toc_entry(x) - if self.oeb.toc: fix_toc_entry(self.oeb.toc)