[CalendarServer-changes] [13038] CalendarServer/branches/users/sagen/move2who-4/calendarserver/push/ applepush.py
source_changes at macosforge.org
source_changes at macosforge.org
Fri Mar 28 18:32:08 PDT 2014
Revision: 13038
http://trac.calendarserver.org//changeset/13038
Author: sagen at apple.com
Date: 2014-03-28 18:32:08 -0700 (Fri, 28 Mar 2014)
Log Message:
-----------
yield
Modified Paths:
--------------
CalendarServer/branches/users/sagen/move2who-4/calendarserver/push/applepush.py
Modified: CalendarServer/branches/users/sagen/move2who-4/calendarserver/push/applepush.py
===================================================================
--- CalendarServer/branches/users/sagen/move2who-4/calendarserver/push/applepush.py 2014-03-28 21:51:51 UTC (rev 13037)
+++ CalendarServer/branches/users/sagen/move2who-4/calendarserver/push/applepush.py 2014-03-29 01:32:08 UTC (rev 13038)
@@ -871,6 +871,7 @@
http_GET = http_POST
+ @inlineCallbacks
def principalFromRequest(self, request):
"""
Given an authenticated request, return the principal based on
@@ -879,9 +880,9 @@
principal = None
for collection in self.principalCollections():
data = request.authnUser.children[0].children[0].data
- principal = collection._principalForURI(data)
+ principal = yield collection._principalForURI(data)
if principal is not None:
- return principal
+ returnValue(principal)
@inlineCallbacks
@@ -912,7 +913,7 @@
msg = "Invalid request: bad 'token' %s" % (token,)
else:
- principal = self.principalFromRequest(request)
+ principal = yield self.principalFromRequest(request)
uid = principal.record.uid
try:
yield self.addSubscription(token, key, uid, userAgent, host)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20140328/72e22bfd/attachment.html>
More information about the calendarserver-changes
mailing list