[CalendarServer-changes] [3430] CalendarServer/trunk/twistedcaldav
source_changes at macosforge.org
source_changes at macosforge.org
Mon Dec 1 20:46:31 PST 2008
Revision: 3430
http://trac.macosforge.org/projects/calendarserver/changeset/3430
Author: cdaboo at apple.com
Date: 2008-12-01 20:46:29 -0800 (Mon, 01 Dec 2008)
Log Message:
-----------
Use __eq__ instead of custom method.
Modified Paths:
--------------
CalendarServer/trunk/twistedcaldav/scheduling/implicit.py
CalendarServer/trunk/twistedcaldav/static.py
Modified: CalendarServer/trunk/twistedcaldav/scheduling/implicit.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/scheduling/implicit.py 2008-12-02 04:17:21 UTC (rev 3429)
+++ CalendarServer/trunk/twistedcaldav/scheduling/implicit.py 2008-12-02 04:46:29 UTC (rev 3430)
@@ -339,7 +339,7 @@
rname = collection.index().resourceNameForUID(self.uid)
if rname:
child = (yield self.request.locateResource(joinURL(collection_uri, rname)))
- if child.sameResource(check_resource):
+ if child == check_resource:
returnValue(True)
matched_type = "schedule" if child and child.hasDeadProperty(TwistedSchedulingObjectResource()) else "calendar"
if (
Modified: CalendarServer/trunk/twistedcaldav/static.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/static.py 2008-12-02 04:17:21 UTC (rev 3429)
+++ CalendarServer/trunk/twistedcaldav/static.py 2008-12-02 04:46:29 UTC (rev 3430)
@@ -92,7 +92,9 @@
else:
return super(CalDAVFile, self).__repr__()
- def sameResource(self, other):
+ def __eq__(self, other):
+ if not isinstance(other, CalDAVFile):
+ return False
return self.fp.path == other.fp.path
def checkPreconditions(self, request):
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20081201/b2027412/attachment.html>
More information about the calendarserver-changes
mailing list