From 86ed99a7d78e4690d103f4334dc0eef03c47e402 Mon Sep 17 00:00:00 2001 From: Duda Dornelles Date: Thu, 22 Jan 2015 15:50:36 -0200 Subject: #224 fixing tests and app for twisted migration --- service/pixelated/resources/attachments_resource.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'service/pixelated/resources/attachments_resource.py') diff --git a/service/pixelated/resources/attachments_resource.py b/service/pixelated/resources/attachments_resource.py index 0ab214b9..e0ba1bd1 100644 --- a/service/pixelated/resources/attachments_resource.py +++ b/service/pixelated/resources/attachments_resource.py @@ -19,10 +19,14 @@ import io import re from twisted.protocols.basic import FileSender from twisted.python.log import err +from twisted.web import server from twisted.web.resource import Resource class AttachmentResource(Resource): + + isLeaf = True + def __init__(self, attachment_id, querier): Resource.__init__(self) self.attachment_id = attachment_id @@ -44,7 +48,7 @@ class AttachmentResource(Resource): d.addErrback(err).addCallback(cb_finished) - return d + return server.NOT_DONE_YET def _extract_mimetype(self, content_type): match = re.compile('([A-Za-z-]+\/[A-Za-z-]+)').search(content_type) @@ -53,8 +57,6 @@ class AttachmentResource(Resource): class AttachmentsResource(Resource): - isLeaf = True - def __init__(self, querier): Resource.__init__(self) self.querier = querier -- cgit v1.2.3