projects
/
treecutter.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1ed4abf
)
Display xpointer details to simplify debugging.
author
Fredrik Unger
<fred@tree.se>
Mon, 4 Jun 2012 10:45:48 +0000
(12:45 +0200)
committer
Fredrik Unger
<fred@tree.se>
Mon, 4 Jun 2012 10:45:48 +0000
(12:45 +0200)
If there are several xincludes in a document and several
translations it is hard to find the xinclude call that failed.
Priting the xpointer helps localize the problem.
treecutter/page.py
patch
|
blob
|
history
diff --git
a/treecutter/page.py
b/treecutter/page.py
index e02a03c58f3d8b365fb6fd87904ece3033851a74..1cb2bafe9b19a809b5ea9df334a5bdeb0b82dd97 100644
(file)
--- a/
treecutter/page.py
+++ b/
treecutter/page.py
@@
-70,7
+70,7
@@
class Page():
os.chdir(cwd)
xmlblock = str(xml.stdout.read())
te = time()
- print " [%5.2f s]
" % (round(te-ts,2)
)
+ print " [%5.2f s]
(%s)" % (round(te-ts,2),c.xpointer
)
xstr = bindery.parse(xmlblock)
idp = c.xml_index_on_parent
for x in xstr.xml_children: