You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
1.2 KiB
40 lines
1.2 KiB
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):
|