Skip to content

Commit

Permalink
Be more verbose, but a little easier to read
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian Sutherland committed Mar 7, 2011
1 parent f04d70e commit f7e26a9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/zope/testbrowser/ftests/wsgitestapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,10 @@ def __call__(self, environ, start_response):
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)

Expand Down

0 comments on commit f7e26a9

Please sign in to comment.