[CalendarServer-changes] [478] CalendarServer/trunk/twistedcaldav/directory/resource.py

source_changes at macosforge.org source_changes at macosforge.org
Wed Nov 15 15:23:47 PST 2006


Revision: 478
          http://trac.macosforge.org/projects/calendarserver/changeset/478
Author:   wsanchez at apple.com
Date:     2006-11-15 15:23:46 -0800 (Wed, 15 Nov 2006)

Log Message:
-----------
Don't call .iterkeys() on None

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

Modified: CalendarServer/trunk/twistedcaldav/directory/resource.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/directory/resource.py	2006-11-15 23:13:20 UTC (rev 477)
+++ CalendarServer/trunk/twistedcaldav/directory/resource.py	2006-11-15 23:23:46 UTC (rev 478)
@@ -393,10 +393,11 @@
         # Get all the directory entries for the new ones in one go for better performance
         if new_names:
             new_entries = self.listCommonAttributes(new_names)
-            new_names = [n for n in new_entries.iterkeys()]
-            new_names.sort()
-            for name in new_names:
-                self.addPrincipal(name, attrs=new_entries[name], fast=True)
+            if new_entries is not None:
+                new_names = [n for n in new_entries.iterkeys()]
+                new_names.sort()
+                for name in new_names:
+                    self.addPrincipal(name, attrs=new_entries[name], fast=True)
             
         # Look for changes in entries
         common_entries = list(remoteguidset.intersection(localguidset))

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


More information about the calendarserver-changes mailing list