|
@ -0,0 +1,40 @@ |
|
|
|
|
|
Index: python-pyamf-0.8.11~git2fe5a4a52c4c/pyamf/tests/gateway/test_twisted.py |
|
|
|
|
|
=================================================================== |
|
|
|
|
|
--- python-pyamf-0.8.11~git2fe5a4a52c4c.orig/pyamf/tests/gateway/test_twisted.py |
|
|
|
|
|
+++ python-pyamf-0.8.11~git2fe5a4a52c4c/pyamf/tests/gateway/test_twisted.py |
|
|
|
|
|
@@ -31,21 +31,22 @@ from pyamf.remoting import gateway |
|
|
|
|
|
from pyamf.flex import messaging |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-@implementer(IBodyProducer) |
|
|
|
|
|
-class BytesProducer(object): |
|
|
|
|
|
- def __init__(self, body): |
|
|
|
|
|
- self.body = body |
|
|
|
|
|
- self.length = len(body) |
|
|
|
|
|
- |
|
|
|
|
|
- def startProducing(self, consumer): |
|
|
|
|
|
- consumer.write(self.body) |
|
|
|
|
|
- return succeed(None) |
|
|
|
|
|
+if twisted: |
|
|
|
|
|
+ @implementer(IBodyProducer) |
|
|
|
|
|
+ class BytesProducer(object): |
|
|
|
|
|
+ def __init__(self, body): |
|
|
|
|
|
+ self.body = body |
|
|
|
|
|
+ self.length = len(body) |
|
|
|
|
|
+ |
|
|
|
|
|
+ def startProducing(self, consumer): |
|
|
|
|
|
+ consumer.write(self.body) |
|
|
|
|
|
+ return succeed(None) |
|
|
|
|
|
|
|
|
|
|
|
- def pauseProducing(self): |
|
|
|
|
|
- pass |
|
|
|
|
|
+ def pauseProducing(self): |
|
|
|
|
|
+ pass |
|
|
|
|
|
|
|
|
|
|
|
- def stopProducing(self): |
|
|
|
|
|
- pass |
|
|
|
|
|
+ def stopProducing(self): |
|
|
|
|
|
+ pass |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class TestService(object): |