[Zope3-checkins] CVS: Zope3/src/zope/publisher - publish.py:1.5

Jim Fulton jim@zope.com
Fri, 7 Feb 2003 10:27:52 -0500


Update of /cvs-repository/Zope3/src/zope/publisher
In directory cvs.zope.org:/tmp/cvs-serv17436

Modified Files:
	publish.py 
Log Message:
Added a debug method to facilitate setting a breakpoint just prior to
calling an application object  when debugging. This is not called in
optimized (-O) mode.


=== Zope3/src/zope/publisher/publish.py 1.4 => 1.5 ===
--- Zope3/src/zope/publisher/publish.py:1.4	Thu Jan  2 11:56:49 2003
+++ Zope3/src/zope/publisher/publish.py	Fri Feb  7 10:27:51 2003
@@ -110,8 +110,14 @@
         args.append(v)
 
     args = tuple(args)
+
+    if __debug__:
+        return debug_call(object, args)
+    
     return object(*args)
 
+def debug_call(object, args):
+    return object(*args)
 
 def publish(request, handle_errors=True):
     try: # finally to clean up to_raise and close request