[CalendarServer-changes] [8151] CalendarServer/branches/users/sagen/applepush/twistedcaldav/ applepush.py

source_changes at macosforge.org source_changes at macosforge.org
Thu Oct 6 15:20:43 PDT 2011


Revision: 8151
          http://trac.macosforge.org/projects/calendarserver/changeset/8151
Author:   sagen at apple.com
Date:     2011-10-06 15:20:41 -0700 (Thu, 06 Oct 2011)
Log Message:
-----------
Fix traceback during subscribe

Modified Paths:
--------------
    CalendarServer/branches/users/sagen/applepush/twistedcaldav/applepush.py

Modified: CalendarServer/branches/users/sagen/applepush/twistedcaldav/applepush.py
===================================================================
--- CalendarServer/branches/users/sagen/applepush/twistedcaldav/applepush.py	2011-10-06 19:05:19 UTC (rev 8150)
+++ CalendarServer/branches/users/sagen/applepush/twistedcaldav/applepush.py	2011-10-06 22:20:41 UTC (rev 8151)
@@ -303,7 +303,6 @@
     def processFeedback(self, timestamp, token):
         self.log_debug("FeedbackProtocol processFeedback time=%d token=%s" %
             (timestamp, token))
-        # TODO: actually see if we need to remove the token from subscriptions
         txn = self.store.newTransaction()
         subscriptions = (yield txn.apnSubscriptionsByToken(token))
 
@@ -382,13 +381,12 @@
     def http_GET(self, request):
         return self.processSubscription(request.args)
 
-    @inlineCallbacks
     def http_POST(self, request):
-        yield parsePOSTData(request)
-        returnValue(self.processSubscription(request.args))
+        return parsePOSTData(request).addCallback(
+            self.processSubscription, request.args)
 
     @inlineCallbacks
-    def processSubscription(self, args):
+    def processSubscription(self, ignored, args):
         token = args.get("token", None)
         key = args.get("key", None)
         if key and token:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20111006/4cee2afe/attachment.html>


More information about the calendarserver-changes mailing list