[CalendarServer-changes] [5258] CalendarServer/trunk/calendarserver/tools/gateway.py

source_changes at macosforge.org source_changes at macosforge.org
Fri Mar 5 13:11:12 PST 2010


Revision: 5258
          http://trac.macosforge.org/projects/calendarserver/changeset/5258
Author:   sagen at apple.com
Date:     2010-03-05 13:11:11 -0800 (Fri, 05 Mar 2010)
Log Message:
-----------
Don't crash if an unknown GUID is referenced

Modified Paths:
--------------
    CalendarServer/trunk/calendarserver/tools/gateway.py

Modified: CalendarServer/trunk/calendarserver/tools/gateway.py
===================================================================
--- CalendarServer/trunk/calendarserver/tools/gateway.py	2010-03-05 21:10:43 UTC (rev 5257)
+++ CalendarServer/trunk/calendarserver/tools/gateway.py	2010-03-05 21:11:11 UTC (rev 5258)
@@ -215,6 +215,9 @@
     def command_getLocationAttributes(self, command):
         guid = command['GeneratedUID']
         record = self.dir.recordWithGUID(guid)
+        if record is None:
+            respondWithError("Principal not found: %s" % (guid,))
+            return
         recordDict = recordToDict(record)
         principal = principalForPrincipalID(guid, directory=self.dir)
         if principal is None:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20100305/4c924eee/attachment.html>


More information about the calendarserver-changes mailing list