mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
More verbose debug messages during splitting
This commit is contained in:
parent
162be5368e
commit
43e4171e88
@ -194,7 +194,7 @@ class CSSFlattener(object):
|
||||
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 @@ class Split(object):
|
||||
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 @@ class FlowSplitter(object):
|
||||
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 @@ class FlowSplitter(object):
|
||||
'\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…
x
Reference in New Issue
Block a user