[CalendarServer-changes] [6448] CalendarServer/trunk

source_changes at macosforge.org source_changes at macosforge.org
Wed Oct 20 09:53:01 PDT 2010


Revision: 6448
          http://trac.macosforge.org/projects/calendarserver/changeset/6448
Author:   cdaboo at apple.com
Date:     2010-10-20 09:52:58 -0700 (Wed, 20 Oct 2010)
Log Message:
-----------
Fix missing yields in inlineCallbacks found by new "missing yields" runtime debug option.

Modified Paths:
--------------
    CalendarServer/trunk/twistedcaldav/method/put_addressbook_common.py
    CalendarServer/trunk/twistedcaldav/sharing.py
    CalendarServer/trunk/twistedcaldav/storebridge.py
    CalendarServer/trunk/txdav/common/datastore/sql.py
    CalendarServer/trunk/txdav/common/datastore/sql_legacy.py

Modified: CalendarServer/trunk/twistedcaldav/method/put_addressbook_common.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/method/put_addressbook_common.py	2010-10-19 15:54:01 UTC (rev 6447)
+++ CalendarServer/trunk/twistedcaldav/method/put_addressbook_common.py	2010-10-20 16:52:58 UTC (rev 6448)
@@ -173,7 +173,7 @@
                         raise HTTPError(ErrorResponse(responsecode.FORBIDDEN, (carddav_namespace, "supported-address-data")))
                 
                     # At this point we need the calendar data to do more tests
-                    self.vcard = self.source.vCard()
+                    self.vcard = (yield self.source.vCard())
                 else:
                     try:
                         if type(self.vcard) in (types.StringType, types.UnicodeType,):
@@ -201,7 +201,7 @@
 
                 # FIXME: We need this here because we have to re-index the destination. Ideally it
                 # would be better to copy the index entries from the source and add to the destination.
-                self.vcard = self.source.vCard()
+                self.vcard = (yield self.source.vCard())
 
             # Valid vcard data size check
             result, message = self.validSizeCheck()

Modified: CalendarServer/trunk/twistedcaldav/sharing.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/sharing.py	2010-10-19 15:54:01 UTC (rev 6447)
+++ CalendarServer/trunk/twistedcaldav/sharing.py	2010-10-20 16:52:58 UTC (rev 6448)
@@ -557,7 +557,7 @@
         )
         
         # Look for existing notification
-        oldnotification = notifications.notificationObjectWithUID(record.inviteuid)
+        oldnotification = (yield notifications.notificationObjectWithUID(record.inviteuid))
         if oldnotification:
             # TODO: rollup changes?
             pass
@@ -585,7 +585,7 @@
         ).toxml()
         
         # Add to collections
-        notifications.writeNotificationObject(record.inviteuid, xmltype, xmldata)
+        yield notifications.writeNotificationObject(record.inviteuid, xmltype, xmldata)
 
     @inlineCallbacks
     def removeInvite(self, record, request):

Modified: CalendarServer/trunk/twistedcaldav/storebridge.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/storebridge.py	2010-10-19 15:54:01 UTC (rev 6447)
+++ CalendarServer/trunk/twistedcaldav/storebridge.py	2010-10-20 16:52:58 UTC (rev 6448)
@@ -654,7 +654,7 @@
         self._newStoreObject = yield self.calendarObject.attachmentWithName(
             self.attachmentName
         )
-        t.loseConnection()
+        yield t.loseConnection()
         returnValue(CREATED)
 
     http_MKCOL = None
@@ -986,7 +986,7 @@
                                          self._newStoreParentHome)
         del self._newStoreCalendar
         self.__class__ = ProtoCalendarCollectionResource
-        self.movedCalendar(request, defaultCalendar,
+        yield self.movedCalendar(request, defaultCalendar,
                            destination, destinationURI)
         returnValue(NO_CONTENT)
 

Modified: CalendarServer/trunk/txdav/common/datastore/sql.py
===================================================================
--- CalendarServer/trunk/txdav/common/datastore/sql.py	2010-10-19 15:54:01 UTC (rev 6447)
+++ CalendarServer/trunk/txdav/common/datastore/sql.py	2010-10-20 16:52:58 UTC (rev 6448)
@@ -384,7 +384,7 @@
         collection = NotificationCollection(self, uid, resourceID)
         yield collection._loadPropertyStore()
         if created:
-            collection._initSyncToken()
+            yield collection._initSyncToken()
         returnValue(collection)
 
 
@@ -659,7 +659,7 @@
         newChild.properties()[
             PropertyName.fromElement(ResourceType)
         ] = newChild.resourceType()
-        newChild._initSyncToken()
+        yield newChild._initSyncToken()
         self.createdChild(newChild)
 
         self.notifyChanged()

Modified: CalendarServer/trunk/txdav/common/datastore/sql_legacy.py
===================================================================
--- CalendarServer/trunk/txdav/common/datastore/sql_legacy.py	2010-10-19 15:54:01 UTC (rev 6447)
+++ CalendarServer/trunk/txdav/common/datastore/sql_legacy.py	2010-10-20 16:52:58 UTC (rev 6448)
@@ -572,7 +572,7 @@
                 ])
 
         shareeCollection = yield self._home.sharedChildWithName(record.localname)
-        shareeCollection._initSyncToken()
+        yield shareeCollection._initSyncToken()
 
 
     @inlineCallbacks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20101020/de572e55/attachment.html>


More information about the calendarserver-changes mailing list