[CalendarServer-changes] [1493] CalendarServer/trunk/twistedcaldav/config.py

source_changes at macosforge.org source_changes at macosforge.org
Thu Apr 19 14:02:51 PDT 2007


Revision: 1493
          http://trac.macosforge.org/projects/calendarserver/changeset/1493
Author:   wsanchez at apple.com
Date:     2007-04-19 14:02:51 -0700 (Thu, 19 Apr 2007)

Log Message:
-----------
Don't try to lookup the directory service defaults if they don't exist
(avoid a KeyError).

Fixes #136

Modified Paths:
--------------
    CalendarServer/trunk/twistedcaldav/config.py

Modified: CalendarServer/trunk/twistedcaldav/config.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/config.py	2007-04-19 21:01:18 UTC (rev 1492)
+++ CalendarServer/trunk/twistedcaldav/config.py	2007-04-19 21:02:51 UTC (rev 1493)
@@ -197,7 +197,10 @@
                 newParams = items["DirectoryService"].get("params", {})
                 _mergeData(oldParams, newParams)
             else:
-                self._data["DirectoryService"]["params"] = copy.deepcopy(serviceDefaultParams[dsType])
+                if dsType in serviceDefaultParams:
+                    self._data["DirectoryService"]["params"] = copy.deepcopy(serviceDefaultParams[dsType])
+                else:
+                    self._data["DirectoryService"]["params"] = {}
 
         for param in items.get("DirectoryService", {}).get("params", {}):
             if param not in serviceDefaultParams[dsType]:

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


More information about the calendarserver-changes mailing list