[Zope3-checkins] CVS: Zope3/src/zope/app - _app.py:1.9

Jim Fulton jim@zope.com
Fri, 2 May 2003 14:00:11 -0400


Update of /cvs-repository/Zope3/src/zope/app
In directory cvs.zope.org:/tmp/cvs-serv26947

Modified Files:
	_app.py 
Log Message:
Added request response status (when available) to output.


=== Zope3/src/zope/app/_app.py 1.8 => 1.9 ===
--- Zope3/src/zope/app/_app.py:1.8	Fri May  2 13:53:36 2003
+++ Zope3/src/zope/app/_app.py	Fri May  2 14:00:10 2003
@@ -143,16 +143,18 @@
             stdout = StringIO()
 
         request = self._request(path, stdin, stdout, *args, **kw)
+        getStatus = getattr(request.response, 'getStatus', lambda: None)
         _publish(request)
         stdout.seek(0)
         print stdout.read()
-        return time.time()-t, time.clock()-c
+        return time.time()-t, time.clock()-c, getStatus()
 
     def run(self, *args, **kw):
         t, c = time.time(), time.clock()
         request = self._request(*args, **kw)
+        getStatus = getattr(request.response, 'getStatus', lambda: None)
         _publish(request, handle_errors = 0)
-        return time.time()-t, time.clock()-c
+        return time.time()-t, time.clock()-c, getStatus()
 
     def debug(self, *args, **kw):