diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/mailman/rest/configure.zcml | 8 | ||||
| -rw-r--r-- | src/mailman/rest/publication.py | 12 |
2 files changed, 10 insertions, 10 deletions
diff --git a/src/mailman/rest/configure.zcml b/src/mailman/rest/configure.zcml index 83ad4ff00..95bcfd194 100644 --- a/src/mailman/rest/configure.zcml +++ b/src/mailman/rest/configure.zcml @@ -41,6 +41,14 @@ factory="mailman.rest.urls.MailingListURLMapper" /> + <adapter + for="zope.publisher.interfaces.NotFound + lazr.restful.simple.Request" + provides="zope.interface.Interface" + factory="lazr.restful.error.NotFoundView" + name="index.html" + /> + <utility factory="mailman.rest.configuration.AdminWebServiceConfiguration" provides="lazr.restful.interfaces.IWebServiceConfiguration"> diff --git a/src/mailman/rest/publication.py b/src/mailman/rest/publication.py index 7c121a1c3..1918dcbc0 100644 --- a/src/mailman/rest/publication.py +++ b/src/mailman/rest/publication.py @@ -56,16 +56,8 @@ class AdminWebServicePublication(Publication): """See `IPublication`.""" # Any in-progress transaction must be aborted. config.db.abort() - # XXX BAW 2009-08-06 This should not be necessary. I need to register - # a view so that 404 will be returned for a NotFound. - exception = exc_info[1] - if isinstance(exception, NotFound): - request.response.reset() - request.response.setStatus(404) - request.response.setResult('') - else: - super(AdminWebServicePublication, self).handleException( - application, request, exc_info, retry_allowed) + super(AdminWebServicePublication, self).handleException( + application, request, exc_info, retry_allowed) def endRequest(self, request, ob): """Ends the interaction.""" |
