[CalendarServer-changes] [12924] CalendarServer/branches/users/sagen/move2who-4/txdav/caldav/ datastore/scheduling/implicit.py
source_changes at macosforge.org
source_changes at macosforge.org
Mon Mar 17 10:11:10 PDT 2014
Revision: 12924
http://trac.calendarserver.org//changeset/12924
Author: sagen at apple.com
Date: 2014-03-17 10:11:10 -0700 (Mon, 17 Mar 2014)
Log Message:
-----------
Can't have a yield and a return -- switch to inlineCallbacks
Modified Paths:
--------------
CalendarServer/branches/users/sagen/move2who-4/txdav/caldav/datastore/scheduling/implicit.py
Modified: CalendarServer/branches/users/sagen/move2who-4/txdav/caldav/datastore/scheduling/implicit.py
===================================================================
--- CalendarServer/branches/users/sagen/move2who-4/txdav/caldav/datastore/scheduling/implicit.py 2014-03-15 16:53:34 UTC (rev 12923)
+++ CalendarServer/branches/users/sagen/move2who-4/txdav/caldav/datastore/scheduling/implicit.py 2014-03-17 17:11:10 UTC (rev 12924)
@@ -633,7 +633,7 @@
self.calendar.sequenceInSync(self.oldcalendar)
# Significant change
- no_change, self.changed_rids, self.needs_action_rids, reinvites, recurrence_reschedule, status_cancelled, only_status = self.isOrganizerChangeInsignificant()
+ no_change, self.changed_rids, self.needs_action_rids, reinvites, recurrence_reschedule, status_cancelled, only_status = yield self.isOrganizerChangeInsignificant()
if no_change:
if reinvites:
log.debug("Implicit - organizer '{organizer}' is re-inviting UID: '{uid}', attendees: {attendees}", organizer=self.organizer, uid=self.uid, attendees=", ".join(reinvites))
@@ -711,6 +711,7 @@
pass
+ @inlineCallbacks
def isOrganizerChangeInsignificant(self):
rids = None
@@ -793,15 +794,16 @@
only_status = False
if checkOrganizerValue:
+ @inlineCallbacks
def _normalizeCUAddress(addr):
if not addr.startswith("urn:uuid"):
principal = yield self.calendar_home.directoryService().recordWithCalendarUserAddress(addr)
if principal is not None:
addr = principal.canonicalCalendarUserAddress()
- return addr
+ returnValue(addr)
- oldOrganizer = _normalizeCUAddress(self.oldcalendar.getOrganizer())
- newOrganizer = _normalizeCUAddress(self.calendar.getOrganizer())
+ oldOrganizer = yield _normalizeCUAddress(self.oldcalendar.getOrganizer())
+ newOrganizer = yield _normalizeCUAddress(self.calendar.getOrganizer())
if oldOrganizer != newOrganizer:
log.error("Cannot change ORGANIZER: UID:{uid}", uid=self.uid)
raise HTTPError(ErrorResponse(
@@ -819,7 +821,10 @@
except KeyError:
pass
- return no_change, rids, date_changed_rids, reinvites, recurrence_reschedule, status_cancelled, only_status
+ returnValue((
+ no_change, rids, date_changed_rids, reinvites,
+ recurrence_reschedule, status_cancelled, only_status
+ ))
def findRemovedAttendees(self):
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20140317/5a3e5fad/attachment.html>
More information about the calendarserver-changes
mailing list