summaryrefslogtreecommitdiff
path: root/repoze/bfg/wsgi.py
diff options
context:
space:
mode:
authorChris McDonough <chrism@agendaless.com>2009-05-31 16:52:41 +0000
committerChris McDonough <chrism@agendaless.com>2009-05-31 16:52:41 +0000
commit1db5469c9c189a1f5480e7f61e308a0179a2bd42 (patch)
tree4d35736b63519cf62ad36be4ef393098a4a85c8e /repoze/bfg/wsgi.py
parentab8e062ee0c610063580373001b07756e6bd0fd4 (diff)
downloadpyramid-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.py24
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'