[CalendarServer-changes] [1970] CalendarServer/branches/users/cdaboo/server2server-1965/ twistedcaldav/ical.py

source_changes at macosforge.org source_changes at macosforge.org
Fri Oct 19 10:55:08 PDT 2007


Revision: 1970
          http://trac.macosforge.org/projects/calendarserver/changeset/1970
Author:   cdaboo at apple.com
Date:     2007-10-19 10:55:07 -0700 (Fri, 19 Oct 2007)

Log Message:
-----------
Return empty list if no matching attendees.

Modified Paths:
--------------
    CalendarServer/branches/users/cdaboo/server2server-1965/twistedcaldav/ical.py

Modified: CalendarServer/branches/users/cdaboo/server2server-1965/twistedcaldav/ical.py
===================================================================
--- CalendarServer/branches/users/cdaboo/server2server-1965/twistedcaldav/ical.py	2007-10-17 20:40:13 UTC (rev 1969)
+++ CalendarServer/branches/users/cdaboo/server2server-1965/twistedcaldav/ical.py	2007-10-19 17:55:07 UTC (rev 1970)
@@ -1010,7 +1010,7 @@
         # Need to normalize http/https cu addresses
         test = set()
         for item in match:
-           test.add(_normalizeCUAddress(item))
+            test.add(_normalizeCUAddress(item))
         
         # Extract appropriate sub-component if this is a VCALENDAR
         if self.name() == "VCALENDAR":
@@ -1035,24 +1035,13 @@
         
         assert self.name() == "VCALENDAR", "Not a calendar: %r" % (self,)
 
-        # FIXME: we should really have a URL class and have it manage comparisons
-        # in a sensible fashion.
-        def _normalizeCUAddress(addr):
-            if addr.startswith("/") or addr.startswith("http:") or addr.startswith("https:"):
-                return addr.rstrip("/")
-            else:
-                return addr
-
-        # Need to normalize http/https cu addresses
-        test = set()
-        for item in match:
-           test.add(_normalizeCUAddress(item))
-        
         # Extract appropriate sub-component if this is a VCALENDAR
         results = []
         for component in self.subcomponents():
             if component.name() != "VTIMEZONE":
-                results.append(component.getAttendeeProperty(match))
+                attendee = component.getAttendeeProperty(match)
+                if attendee:
+                    results.append(attendee)
 
         return results
 

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


More information about the calendarserver-changes mailing list