[CalendarServer-changes] [4729] CalendarServer/trunk/twistedcaldav/directory/cachingdirectory.py
source_changes at macosforge.org
source_changes at macosforge.org
Mon Nov 9 16:56:35 PST 2009
Revision: 4729
http://trac.macosforge.org/projects/calendarserver/changeset/4729
Author: wsanchez at apple.com
Date: 2009-11-09 16:56:35 -0800 (Mon, 09 Nov 2009)
Log Message:
-----------
raise UnknownRecordTypeError, not KeyError.
Modified Paths:
--------------
CalendarServer/trunk/twistedcaldav/directory/cachingdirectory.py
Modified: CalendarServer/trunk/twistedcaldav/directory/cachingdirectory.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/directory/cachingdirectory.py 2009-11-10 00:56:06 UTC (rev 4728)
+++ CalendarServer/trunk/twistedcaldav/directory/cachingdirectory.py 2009-11-10 00:56:35 UTC (rev 4729)
@@ -31,7 +31,7 @@
import base64
from twistedcaldav.config import config
-from twistedcaldav.directory.directory import DirectoryService, DirectoryRecord, DirectoryError
+from twistedcaldav.directory.directory import DirectoryService, DirectoryRecord, DirectoryError, UnknownRecordTypeError
from twistedcaldav.log import LoggingMixIn
from twistedcaldav.scheduling.cuaddress import normalizeCUAddr
@@ -215,7 +215,10 @@
)
def recordCacheForType(self, recordType):
- return self._recordCaches[recordType]
+ try:
+ return self._recordCaches[recordType]
+ except KeyError:
+ raise UnknownRecordTypeError(recordType)
def listRecords(self, recordType):
return self.recordCacheForType(recordType).records
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20091109/f4228c7f/attachment-0001.html>
More information about the calendarserver-changes
mailing list