diff options
| author | Chris McDonough <chrism@agendaless.com> | 2009-05-31 16:52:41 +0000 |
|---|---|---|
| committer | Chris McDonough <chrism@agendaless.com> | 2009-05-31 16:52:41 +0000 |
| commit | 1db5469c9c189a1f5480e7f61e308a0179a2bd42 (patch) | |
| tree | 4d35736b63519cf62ad36be4ef393098a4a85c8e /repoze/bfg/wsgi.py | |
| parent | ab8e062ee0c610063580373001b07756e6bd0fd4 (diff) | |
| download | pyramid-1db5469c9c189a1f5480e7f61e308a0179a2bd42.tar.gz pyramid-1db5469c9c189a1f5480e7f61e308a0179a2bd42.tar.bz2 pyramid-1db5469c9c189a1f5480e7f61e308a0179a2bd42.zip | |
- Remove ``repoze.bfg.wsgi.HTTPException``,
``repoze.bfg.wsgi.NotFound``, and ``repoze.bfg.wsgi.Unauthorized``.
These classes were disused with the introduction of the
``IUnauthorizedView`` and ``INotFoundView`` machinery.
Diffstat (limited to 'repoze/bfg/wsgi.py')
| -rw-r--r-- | repoze/bfg/wsgi.py | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/repoze/bfg/wsgi.py b/repoze/bfg/wsgi.py index 027345673..a04be9e97 100644 --- a/repoze/bfg/wsgi.py +++ b/repoze/bfg/wsgi.py @@ -1,5 +1,3 @@ -from cgi import escape - try: from functools import wraps except ImportError: #pragma NO COVERAGE @@ -102,25 +100,3 @@ def wsgiapp2(wrapped): return request.get_response(wrapped) return wraps(wrapped)(decorator) # grokkability -class HTTPException(object): - def __call__(self, environ, start_response, exc_info=False): - try: - msg = escape(environ['repoze.bfg.message']) - except KeyError: - msg = '' - html = """<body> - <html><title>%s</title><body><h1>%s</h1> - <code>%s</code> - """ % (self.status, self.status, msg) - headers = [('Content-Length', str(len(html))), - ('Content-Type', 'text/html')] - start_response(self.status, headers) - return [html] - -class NotFound(HTTPException): - """ The default NotFound WSGI application """ - status = '404 Not Found' - -class Unauthorized(HTTPException): - """ The default Unauthorized WSGI application """ - status = '401 Unauthorized' |
