diff options
author | NavaL <ayoyo@thoughtworks.com> | 2016-09-28 16:01:13 +0200 |
---|---|---|
committer | NavaL <ayoyo@thoughtworks.com> | 2016-09-28 16:03:09 +0200 |
commit | 663241d3add5dca912efac9c080181ede94dbe9f (patch) | |
tree | 73e83f76dc404b09c6f85e2620a56c805483f429 /service/pixelated/resources | |
parent | b9549559b136ddbe2cc5b81fe244457e556cd7ab (diff) |
actually 404-ing valid requests but non-existing resource
Issue #684
Diffstat (limited to 'service/pixelated/resources')
-rw-r--r-- | service/pixelated/resources/root_resource.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/service/pixelated/resources/root_resource.py b/service/pixelated/resources/root_resource.py index 54fe7b4a..504d156d 100644 --- a/service/pixelated/resources/root_resource.py +++ b/service/pixelated/resources/root_resource.py @@ -31,6 +31,7 @@ from pixelated.resources.mail_resource import MailResource from pixelated.resources.mails_resource import MailsResource from pixelated.resources.tags_resource import TagsResource from pixelated.resources.keys_resource import KeysResource +from twisted.web.resource import NoResource from twisted.web.static import File from pixelated.resources.users import UsersResource @@ -139,4 +140,4 @@ class ChildResourcesMap(object): self._registry[path] = resource def get(self, path): - return self._registry.get(path) + return self._registry.get(path) or NoResource() |