[CalendarServer-changes] [5656] CalendarServer/trunk/calendarserver/tools/util.py

source_changes at macosforge.org source_changes at macosforge.org
Wed May 26 15:22:37 PDT 2010


Revision: 5656
          http://trac.macosforge.org/projects/calendarserver/changeset/5656
Author:   wsanchez at apple.com
Date:     2010-05-26 15:22:34 -0700 (Wed, 26 May 2010)
Log Message:
-----------
Raise DirectoryError instead of IOError when setting up augments fails to write to disk.

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

Modified: CalendarServer/trunk/calendarserver/tools/util.py
===================================================================
--- CalendarServer/trunk/calendarserver/tools/util.py	2010-05-26 19:32:06 UTC (rev 5655)
+++ CalendarServer/trunk/calendarserver/tools/util.py	2010-05-26 22:22:34 UTC (rev 5656)
@@ -33,7 +33,7 @@
 from twistedcaldav.config import config, ConfigurationError
 from twistedcaldav.directory import augment, calendaruserproxy
 from twistedcaldav.directory.aggregate import AggregateDirectoryService
-from twistedcaldav.directory.directory import DirectoryService, DirectoryRecord
+from twistedcaldav.directory.directory import DirectoryService, DirectoryRecord, DirectoryError
 from twistedcaldav.notify import installNotificationClient
 from twistedcaldav.static import CalendarHomeProvisioningFile
 from twistedcaldav.stdconfig import DEFAULT_CONFIG_FILE
@@ -96,7 +96,11 @@
 
     # Load augment/proxy db classes now
     augmentClass = namedClass(config.AugmentService.type)
-    augment.AugmentService = augmentClass(**config.AugmentService.params)
+    try:
+        augment.AugmentService = augmentClass(**config.AugmentService.params)
+    except IOError, e:
+        # FIXME: Augments DB tries to write to disk, which seems annoying                                                                                                              
+        raise DirectoryError(e)
 
     proxydbClass = namedClass(config.ProxyDBService.type)
     calendaruserproxy.ProxyDBService = proxydbClass(**config.ProxyDBService.params)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20100526/b86e9d59/attachment-0001.html>


More information about the calendarserver-changes mailing list