[Checkins] SVN: zope.testbrowser/branches/jinty-webtest3/src/zope/testbrowser/ftests/wsgitestapp.py Be more verbose, but a little easier to read

Brian Sutherland jinty at web.de
Mon Mar 7 05:46:01 EST 2011


Log message for revision 120780:
  Be more verbose, but a little easier to read

Changed:
  U   zope.testbrowser/branches/jinty-webtest3/src/zope/testbrowser/ftests/wsgitestapp.py

-=-
Modified: zope.testbrowser/branches/jinty-webtest3/src/zope/testbrowser/ftests/wsgitestapp.py
===================================================================
--- zope.testbrowser/branches/jinty-webtest3/src/zope/testbrowser/ftests/wsgitestapp.py	2011-03-07 10:42:40 UTC (rev 120779)
+++ zope.testbrowser/branches/jinty-webtest3/src/zope/testbrowser/ftests/wsgitestapp.py	2011-03-07 10:46:00 UTC (rev 120780)
@@ -57,7 +57,10 @@
             if not environ.get('wsgi.handleErrors', True):
                 raise
             resp = Response()
-            resp.status = {NotFound: 404}.get(type(exc), 500)
+            status = 500
+            if isinstance(exc, NotFound):
+                status = 404
+            resp.status = status
         resp.headers.add('X-Powered-By', 'Zope (www.zope.org), Python (www.python.org)')
         return resp(environ, start_response)
 



More information about the checkins mailing list