[CalendarServer-changes] [826] CalendarServer/branches/users/wsanchez/dropbox/twistedcaldav/test/ data/makelargecalendars.py

source_changes at macosforge.org source_changes at macosforge.org
Thu Dec 14 14:04:25 PST 2006


Revision: 826
          http://trac.macosforge.org/projects/calendarserver/changeset/826
Author:   wsanchez at apple.com
Date:     2006-12-14 14:04:25 -0800 (Thu, 14 Dec 2006)

Log Message:
-----------
More betterness

Modified Paths:
--------------
    CalendarServer/branches/users/wsanchez/dropbox/twistedcaldav/test/data/makelargecalendars.py

Modified: CalendarServer/branches/users/wsanchez/dropbox/twistedcaldav/test/data/makelargecalendars.py
===================================================================
--- CalendarServer/branches/users/wsanchez/dropbox/twistedcaldav/test/data/makelargecalendars.py	2006-12-14 21:51:56 UTC (rev 825)
+++ CalendarServer/branches/users/wsanchez/dropbox/twistedcaldav/test/data/makelargecalendars.py	2006-12-14 22:04:25 UTC (rev 826)
@@ -23,12 +23,16 @@
 user_max = 20
 calendars = ("calendar.10", "calendar.100", "calendar.1000",)
 
-for ctr in xrange(1, user_max + 1):
+for ctr in xrange(1, user_max + 1): 
+    path = "calendars/user/user%02d" % (ctr,)
+
+    try: os.makedirs(path)
+    except OSError: pass
+
+    try: os.makedirs(os.path.join(path, "calendar"))
+    except OSError: pass
+
     for calendar in calendars:
-        path = "calendars/user/user%02d" % (ctr,)
-        if not os.path.isdir(path):
-            os.makedirs(path)
-
         if not os.path.isdir(os.path.join(path, calendar)):
             print "Expanding %s to %s" % (calendar, path)
             cmd = "tar -C %r -zx -f %r" % (path, calendar + ".tgz")

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


More information about the calendarserver-changes mailing list