[CalendarServer-changes] [290] CalendarServer/trunk/twistedcaldav/method/put_common.py

source_changes at macosforge.org source_changes at macosforge.org
Mon Oct 23 21:30:10 PDT 2006


Revision: 290
          http://trac.macosforge.org/projects/calendarserver/changeset/290
Author:   wsanchez at apple.com
Date:     2006-10-23 21:30:09 -0700 (Mon, 23 Oct 2006)

Log Message:
-----------
minor

Modified Paths:
--------------
    CalendarServer/trunk/twistedcaldav/method/put_common.py

Modified: CalendarServer/trunk/twistedcaldav/method/put_common.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/method/put_common.py	2006-10-24 04:14:24 UTC (rev 289)
+++ CalendarServer/trunk/twistedcaldav/method/put_common.py	2006-10-24 04:30:09 UTC (rev 290)
@@ -71,7 +71,7 @@
     @param sourceparent:      the L{CalDAVFile} for the source resource's parent collection, or None if source is None.
     @param destinationparent: the L{CalDAVFile} for the destination resource's parent collection.
     @param deletesource:      True if the source resource is to be deleted on successful completion, False otherwise.
-    @param isiTIP:            True if relaxed calendar data validation is to be done, False otehrwise.
+    @param isiTIP:            True if relaxed calendar data validation is to be done, False otherwise.
     @return:                  status response.
     """
     
@@ -268,16 +268,15 @@
             rname = index.resourceNameForUID(uid)
             # This can happen if two simulataneous PUTs occur with the same UID.
             # i.e. one PUT has reserved the UID but has not yet written the resource,
-            # the other PUT tries to reserve and fails but no index entry exists yets.
+            # the other PUT tries to reserve and fails but no index entry exists yet.
             if rname is None:
                 rname = "<<Unknown Resource>>"
             
             result = False
             message = "Calendar resource %s already exists with same UID %s" % (rname, uid)
         else:
-            # Cannot overwrite different UID
-            overwrite = destination.fp.exists()
-            if overwrite:
+            # Cannot overwrite a resource with different UID
+            if destination.fp.exists():
                 olduid = index.resourceUIDForName(destination.fp.basename())
                 if olduid != uid:
                     rname = destination.fp.basename()

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20061023/d5e21446/attachment.html


More information about the calendarserver-changes mailing list