[CalendarServer-changes] [5612] CalendarServer/branches/new-store/twistedcaldav/index.py

source_changes at macosforge.org source_changes at macosforge.org
Tue May 18 13:32:35 PDT 2010


Revision: 5612
          http://trac.macosforge.org/projects/calendarserver/changeset/5612
Author:   glyph at apple.com
Date:     2010-05-18 13:32:32 -0700 (Tue, 18 May 2010)
Log Message:
-----------
test-case-name, remove 'os' dependency

Modified Paths:
--------------
    CalendarServer/branches/new-store/twistedcaldav/index.py

Modified: CalendarServer/branches/new-store/twistedcaldav/index.py
===================================================================
--- CalendarServer/branches/new-store/twistedcaldav/index.py	2010-05-18 20:25:31 UTC (rev 5611)
+++ CalendarServer/branches/new-store/twistedcaldav/index.py	2010-05-18 20:32:32 UTC (rev 5612)
@@ -1,3 +1,4 @@
+# -*- test-case-name: twistedcaldav.test.test_index -*-
 ##
 # Copyright (c) 2005-2010 Apple Inc. All rights reserved.
 #
@@ -31,7 +32,6 @@
 ]
 
 import datetime
-import os
 import time
 import hashlib
 
@@ -118,7 +118,7 @@
             C{resource.isPseudoCalendarCollection()} returns C{True}.)
         """
         self.resource = resource
-        db_filename = os.path.join(self.resource.fp.path, db_basename)
+        db_filename = self.resource.fp.child(db_basename).path
         super(AbstractCalendarIndex, self).__init__(db_filename, False)
 
     def create(self):
@@ -260,7 +260,7 @@
         @return: a C{list} of all names that exist
         """
         statement = "select NAME from RESOURCE where NAME in ("
-        for ctr, ignore_name in enumerate(names):
+        for ctr in (item[0] for item in enumerate(names)):
             if ctr != 0:
                 statement += ", "
             statement += ":%s" % (ctr,)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20100518/b404fc23/attachment-0001.html>


More information about the calendarserver-changes mailing list