diff options
author | ianb <devnull@localhost> | 2005-12-13 08:20:25 +0000 |
---|---|---|
committer | ianb <devnull@localhost> | 2005-12-13 08:20:25 +0000 |
commit | e6d3daa93b95a5597575eb466b3a580ff26bb810 (patch) | |
tree | 05787b6102f93677179ac7ba3e8651b1fe56b063 /paste/evalexception | |
parent | ac8b22aed75bc39964804e790aecea870862d23e (diff) | |
download | paste-e6d3daa93b95a5597575eb466b3a580ff26bb810.tar.gz |
Deprecate the wsgilib.error_response functions; stop using them internally as well, in preference of httpexceptions.*.wsgi_application
Diffstat (limited to 'paste/evalexception')
-rw-r--r-- | paste/evalexception/middleware.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/paste/evalexception/middleware.py b/paste/evalexception/middleware.py index 6c10f08..8f7ca20 100644 --- a/paste/evalexception/middleware.py +++ b/paste/evalexception/middleware.py @@ -164,14 +164,14 @@ class EvalException(object): next_part = wsgilib.path_info_pop(environ) method = getattr(self, next_part, None) if not method: - return wsgilib.error_response_app( - '404 Not Found', '%r not found when parsing %r' - % (next_part, wsgilib.construct_url(environ)))( - environ, start_response) + exc = httpexceptions.HTTPNotFound( + '%r not found when parsing %r' + % (next_part, wsgilib.construct_url(environ))) + return exc.wsgi_application(environ, start_response) if not getattr(method, 'exposed', False): - return wsgilib.error_response_app( - '403 Forbidden', '%r not allowed' % next_part)( - environ, start_response) + exc = httpexceptions.HTTPForbidden( + '%r not allowed' % next_part) + return exc.wsgi_application(environ, start_response) return method(environ, start_response) def media(self, environ, start_response): |