From 1db5469c9c189a1f5480e7f61e308a0179a2bd42 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sun, 31 May 2009 16:52:41 +0000 Subject: - 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. --- repoze/bfg/wsgi.py | 24 ------------------------ 1 file changed, 24 deletions(-) (limited to 'repoze/bfg/wsgi.py') 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 = """ - %s

%s

- %s - """ % (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' -- cgit v1.2.3