[CalendarServer-changes] [5340] CalendarServer/trunk/calendarserver/tools/test

source_changes at macosforge.org source_changes at macosforge.org
Wed Mar 17 11:36:39 PDT 2010


Revision: 5340
          http://trac.macosforge.org/projects/calendarserver/changeset/5340
Author:   wsanchez at apple.com
Date:     2010-03-17 11:36:39 -0700 (Wed, 17 Mar 2010)
Log Message:
-----------
Create DataRoot before trying to write files into it

Modified Paths:
--------------
    CalendarServer/trunk/calendarserver/tools/test/test_gateway.py
    CalendarServer/trunk/calendarserver/tools/test/test_principals.py

Modified: CalendarServer/trunk/calendarserver/tools/test/test_gateway.py
===================================================================
--- CalendarServer/trunk/calendarserver/tools/test/test_gateway.py	2010-03-17 18:32:37 UTC (rev 5339)
+++ CalendarServer/trunk/calendarserver/tools/test/test_gateway.py	2010-03-17 18:36:39 UTC (rev 5340)
@@ -49,6 +49,8 @@
         self.configFileName = configFilePath.path
         config.load(self.configFileName)
 
+        os.makedirs(config.DataRoot)
+
         origUsersFile = FilePath(os.path.join(os.path.dirname(__file__),
             "gateway", "users-groups.xml"))
         copyUsersFile = FilePath(os.path.join(config.DataRoot, "accounts.xml"))

Modified: CalendarServer/trunk/calendarserver/tools/test/test_principals.py
===================================================================
--- CalendarServer/trunk/calendarserver/tools/test/test_principals.py	2010-03-17 18:32:37 UTC (rev 5339)
+++ CalendarServer/trunk/calendarserver/tools/test/test_principals.py	2010-03-17 18:36:39 UTC (rev 5340)
@@ -36,7 +36,7 @@
         templateFile.close()
 
         newConfig = template % {
-            'ServerRoot' : os.path.abspath(config.ServerRoot),
+            "ServerRoot" : os.path.abspath(config.ServerRoot),
         }
         configFilePath = FilePath(os.path.join(config.ConfigRoot, "caldavd.plist"))
         configFilePath.setContent(newConfig)
@@ -44,6 +44,8 @@
         self.configFileName = configFilePath.path
         config.load(self.configFileName)
 
+        os.makedirs(config.DataRoot)
+
         origUsersFile = FilePath(os.path.join(os.path.dirname(__file__),
             "principals", "users-groups.xml"))
         copyUsersFile = FilePath(os.path.join(config.DataRoot, "accounts.xml"))
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20100317/0ed4e15c/attachment.html>


More information about the calendarserver-changes mailing list