[CalendarServer-changes] [1927] CalendarServer/trunk/twistedcaldav/directory/principal.py

source_changes at macosforge.org source_changes at macosforge.org
Fri Sep 28 14:48:41 PDT 2007


Revision: 1927
          http://trac.macosforge.org/projects/calendarserver/changeset/1927
Author:   wsanchez at apple.com
Date:     2007-09-28 14:48:41 -0700 (Fri, 28 Sep 2007)

Log Message:
-----------
Handle None erturned by self.parent.principalForRecord(relative) in _getRelatives().
Log it as an error, but don't add None to the relatives list.

Modified Paths:
--------------
    CalendarServer/trunk/twistedcaldav/directory/principal.py

Modified: CalendarServer/trunk/twistedcaldav/directory/principal.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/directory/principal.py	2007-09-28 20:03:41 UTC (rev 1926)
+++ CalendarServer/trunk/twistedcaldav/directory/principal.py	2007-09-28 21:48:41 UTC (rev 1927)
@@ -469,11 +469,13 @@
             for relative in getattr(record, method)():
                 if relative not in records:
                     found = self.parent.principalForRecord(relative)
+                    if found is None:
+                        log.err("No principal found for directory record: %r" % (relative,))
+                    else:
+                        if proxy:
+                            found = found.getChild("calendar-proxy-write")
+                        relatives.add(found)
 
-                    if proxy:
-                        found = found.getChild("calendar-proxy-write")
-                    relatives.add(found)
-
                     self._getRelatives(method, relative, relatives, records)
 
         return relatives

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


More information about the calendarserver-changes mailing list