diff options
| author | Barry Warsaw | 2014-08-12 20:12:17 -0400 |
|---|---|---|
| committer | Barry Warsaw | 2014-08-12 20:12:17 -0400 |
| commit | bc4e33da9a97df35d147e58535358b2468cd1cc8 (patch) | |
| tree | 4aa21daa4614ff8e7ecc9c00c39267a456cf8c36 /src/mailman/rest/helpers.py | |
| parent | 61ad6fde0a9cff213a347838f19878a7b52f5466 (diff) | |
| download | mailman-bc4e33da9a97df35d147e58535358b2468cd1cc8.tar.gz mailman-bc4e33da9a97df35d147e58535358b2468cd1cc8.tar.zst mailman-bc4e33da9a97df35d147e58535358b2468cd1cc8.zip | |
Diffstat (limited to 'src/mailman/rest/helpers.py')
| -rw-r--r-- | src/mailman/rest/helpers.py | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/mailman/rest/helpers.py b/src/mailman/rest/helpers.py index af7392f5a..5b51bc436 100644 --- a/src/mailman/rest/helpers.py +++ b/src/mailman/rest/helpers.py @@ -324,9 +324,12 @@ class ChildError: def __init__(self, status): self._status = status - def on_get(self, request, response): + def _oops(self, request, response): raise falcon.HTTPError(self._status, None) + on_get = _oops + on_post = _oops + class BadRequest(ChildError): def __init__(self): @@ -336,9 +339,3 @@ class BadRequest(ChildError): class NotFound(ChildError): def __init__(self): super(NotFound, self).__init__(falcon.HTTP_404) - - -def path_not_found(request, response, **kws): - # Like falcon.responders.path_not_found() but sets the body. - response.status = falcon.HTTP_404 - response.body = b'404 Not Found' |
