mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-08 20:03:43 +02:00
More verbose debug messages during splitting
This commit is contained in:
parent
162be5368e
commit
43e4171e88
2 changed files with 5 additions and 2 deletions
|
|
@ -194,7 +194,7 @@ def clean_edges(self, cssdict, style, fsize):
|
|||
def flatten_node(self, node, stylizer, names, styles, psize, left=0):
|
||||
if not isinstance(node.tag, basestring) \
|
||||
or namespace(node.tag) != XHTML_NS:
|
||||
return
|
||||
return
|
||||
tag = barename(node.tag)
|
||||
style = stylizer.style(node)
|
||||
cssdict = style.cssdict()
|
||||
|
|
|
|||
|
|
@ -91,7 +91,6 @@ def find_page_breaks(self, item):
|
|||
False))
|
||||
except:
|
||||
pass
|
||||
|
||||
page_breaks = set([])
|
||||
for selector, before in self.page_break_selectors:
|
||||
body = item.data.xpath('//h:body', namespaces=NAMESPACES)
|
||||
|
|
@ -382,6 +381,7 @@ def split_to_size(self, tree):
|
|||
p[i:i+1] = new_pres
|
||||
|
||||
split_point, before = self.find_split_point(root)
|
||||
self.log.debug('\t\t\tSplit point:', split_point.tag, tree.getpath(split_point))
|
||||
if split_point is None:
|
||||
raise SplitError(self.item.href, root)
|
||||
|
||||
|
|
@ -396,6 +396,9 @@ def split_to_size(self, tree):
|
|||
'\t\t\tCommitted sub-tree #%d (%d KB)'%(
|
||||
len(self.split_trees), size/1024.))
|
||||
else:
|
||||
self.log.debug(
|
||||
'\t\t\tSplit tree still too large: %d KB' % \
|
||||
(size/1024.))
|
||||
self.split_to_size(t)
|
||||
|
||||
def find_split_point(self, root):
|
||||
|
|
|
|||
Loading…
Reference in a new issue