summaryrefslogtreecommitdiff
path: root/service/pixelated/resources/attachments_resource.py
diff options
context:
space:
mode:
authorDuda Dornelles <dudassdornelles@gmail.com>2015-01-22 15:50:36 -0200
committerPixpoa pairing <pixpoapairing@pixelated-project.org>2015-01-22 16:50:53 -0200
commit86ed99a7d78e4690d103f4334dc0eef03c47e402 (patch)
treedafd5d0aca3efb6f3c8afdc755c88423fba5991f /service/pixelated/resources/attachments_resource.py
parent81552abcfe67f61b68ad7cbf424738f7788f148c (diff)
#224 fixing tests and app for twisted migration
Diffstat (limited to 'service/pixelated/resources/attachments_resource.py')
-rw-r--r--service/pixelated/resources/attachments_resource.py8
1 files changed, 5 insertions, 3 deletions
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