summaryrefslogtreecommitdiff
path: root/docutils
diff options
context:
space:
mode:
authorwiemann <wiemann@929543f6-e4f2-0310-98a6-ba3bd3dd1d04>2004-09-12 13:08:35 +0000
committerwiemann <wiemann@929543f6-e4f2-0310-98a6-ba3bd3dd1d04>2004-09-12 13:08:35 +0000
commit4fb46eece879e354827781d0e63257fbf0ea8c15 (patch)
tree9276c992e9c4d835c1366d47fb0bea02ee018f56 /docutils
parent210b320973df3c0a6e384a62dc6da871e1f5d95a (diff)
downloaddocutils-4fb46eece879e354827781d0e63257fbf0ea8c15.tar.gz
re-added visit_ and depart_ to debug output, changed method name to match the rest
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@2583 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
Diffstat (limited to 'docutils')
-rw-r--r--docutils/docutils/nodes.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/docutils/docutils/nodes.py b/docutils/docutils/nodes.py
index 5cadb2c0b..cbe24240d 100644
--- a/docutils/docutils/nodes.py
+++ b/docutils/docutils/nodes.py
@@ -107,7 +107,7 @@ class Node:
Parameter `visitor`: A `NodeVisitor` object, containing a
``visit_...`` method for each `Node` subclass encountered.
"""
- visitor.document.reporter.debug(self.__class__.__name__,
+ visitor.document.reporter.debug('visit_' + self.__class__.__name__,
category='nodes.Node.walk')
try:
visitor.dispatch_visit(self, self.__class__.__name__)
@@ -133,7 +133,7 @@ class Node:
and ``depart_...`` methods for each `Node` subclass encountered.
"""
call_depart = 1
- visitor.document.reporter.debug(self.__class__.__name__,
+ visitor.document.reporter.debug('visit_' + self.__class__.__name__,
category='nodes.Node.walkabout')
try:
try:
@@ -151,9 +151,10 @@ class Node:
except SkipChildren:
pass
if call_depart:
- visitor.document.reporter.debug(self.__class__.__name__,
- category='nodes.Node.walkabout')
- visitor.dispatch_depart(self, self.__class__.__name__)
+ visitor.document.reporter.debug(
+ 'depart_' + self.__class__.__name__,
+ category='nodes.Node.walkabout')
+ visitor.dispatch_departure(self, self.__class__.__name__)
class Text(Node, UserString):
@@ -1275,7 +1276,7 @@ class NodeVisitor:
method = getattr(self, 'visit_' + method_name, self.unknown_visit)
return method(node)
- def dispatch_depart(self, node, method_name):
+ def dispatch_departure(self, node, method_name):
method = getattr(self, 'depart_' + method_name, self.unknown_departure)
return method(node)