aboutsummaryrefslogtreecommitdiffstats
path: root/libbe/util
diff options
context:
space:
mode:
authorW. Trevor King <wking@tremily.us>2012-10-28 19:59:41 -0400
committerW. Trevor King <wking@tremily.us>2012-10-28 19:59:41 -0400
commit8f1515c8130bff5de7335f648d6bbffc0a4615e5 (patch)
treebb58b8df7bd4278bc430801d29008354cc4eaeea /libbe/util
parent33f6291e1f4a04e9a56b885dea187943fcfab7a4 (diff)
downloadbugseverywhere-8f1515c8130bff5de7335f648d6bbffc0a4615e5.tar.gz
Use libbe.util.http.HTTP_USER_ERROR everywhere instead of hardcoding 418
Diffstat (limited to 'libbe/util')
-rw-r--r--libbe/util/wsgi.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/libbe/util/wsgi.py b/libbe/util/wsgi.py
index d90311c..cd4fbed 100644
--- a/libbe/util/wsgi.py
+++ b/libbe/util/wsgi.py
@@ -60,6 +60,7 @@ except ImportError:
import libbe.util.encoding
+import libbe.util.http
import libbe.util.id
import libbe.command
import libbe.command.base
@@ -307,7 +308,6 @@ class BEExceptionApp (WSGI_Middleware):
"""
def __init__(self, *args, **kwargs):
super(BEExceptionApp, self).__init__(*args, **kwargs)
- self.http_user_error = 418
def _call(self, environ, start_response):
try:
@@ -318,10 +318,10 @@ class BEExceptionApp (WSGI_Middleware):
raise libbe.util.wsgi.HandlerError(403, 'Write permission denied')
except libbe.storage.InvalidID as e:
raise libbe.util.wsgi.HandlerError(
- self.http_user_error, 'InvalidID {}'.format(e))
+ libbe.util.http.HTTP_USER_ERROR, 'InvalidID {}'.format(e))
except libbe.util.id.NoIDMatches as e:
raise libbe.util.wsgi.HandlerError(
- self.http_user_error, 'NoIDMatches {}'.format(e))
+ libbe.util.http.HTTP_USER_ERROR, 'NoIDMatches {}'.format(e))
class UppercaseHeaderApp (WSGI_Middleware):