@webob.dec.wsgify
def conditional_forbid(req):
 if (('die' in req.params) and (req.params['die'] == '1')):
  raise webob.exc.HTTPForbidden()
 return 'OK'

@ webob . dec . wsgify def conditional_forbid ( req ) : if ( ( 'die' in req . params ) and ( req . params [ 'die' ] == '1' ) ) : raise webob . exc . HTTPForbidden ( ) return 'OK'
helper wsgi app returns 403 if param die is 1 .