[CalendarServer-changes] [8181] CalendarServer/branches/users/sagen/applepush/twistedcaldav
source_changes at macosforge.org
source_changes at macosforge.org
Mon Oct 10 16:37:13 PDT 2011
Revision: 8181
http://trac.macosforge.org/projects/calendarserver/changeset/8181
Author: sagen at apple.com
Date: 2011-10-10 16:37:13 -0700 (Mon, 10 Oct 2011)
Log Message:
-----------
Fixes the AlreadyFinishedError
Modified Paths:
--------------
CalendarServer/branches/users/sagen/applepush/twistedcaldav/applepush.py
CalendarServer/branches/users/sagen/applepush/twistedcaldav/test/test_applepush.py
Modified: CalendarServer/branches/users/sagen/applepush/twistedcaldav/applepush.py
===================================================================
--- CalendarServer/branches/users/sagen/applepush/twistedcaldav/applepush.py 2011-10-10 23:19:56 UTC (rev 8180)
+++ CalendarServer/branches/users/sagen/applepush/twistedcaldav/applepush.py 2011-10-10 23:37:13 UTC (rev 8181)
@@ -312,7 +312,7 @@
self.log_debug("FeedbackProtocol dataReceived %d bytes" % (len(data),))
timestamp, tokenLength, binaryToken = struct.unpack("!IH32s", data)
token = binaryToken.encode("hex")
- self.processFeedback(timestamp, token)
+ return self.processFeedback(timestamp, token)
@inlineCallbacks
def processFeedback(self, timestamp, token):
Modified: CalendarServer/branches/users/sagen/applepush/twistedcaldav/test/test_applepush.py
===================================================================
--- CalendarServer/branches/users/sagen/applepush/twistedcaldav/test/test_applepush.py 2011-10-10 23:19:56 UTC (rev 8180)
+++ CalendarServer/branches/users/sagen/applepush/twistedcaldav/test/test_applepush.py 2011-10-10 23:37:13 UTC (rev 8181)
@@ -122,16 +122,14 @@
binaryToken = token.decode("hex")
feedbackData = struct.pack("!IH32s", timestamp, len(binaryToken),
binaryToken)
- connector.receiveData(feedbackData)
+ yield connector.receiveData(feedbackData)
# The second subscription should now be gone
# Prior to feedback, there are 2 subscriptions
- """ TODO: uncomment this
txn = self.store.newTransaction()
subscriptions = (yield txn.apnSubscriptionsByToken(token))
yield txn.commit()
self.assertEquals(len(subscriptions), 1)
- """
class TestConnector(object):
@@ -144,7 +142,7 @@
service.protocol.makeConnection(self.transport)
def receiveData(self, data):
- self.service.protocol.dataReceived(data)
+ return self.service.protocol.dataReceived(data)
class StubTransport(object):
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20111010/e9688ee1/attachment.html>
More information about the calendarserver-changes
mailing list