[CalendarServer-changes] [8001] CalendarServer/trunk/twistedcaldav/upgrade.py

source_changes at macosforge.org source_changes at macosforge.org
Fri Aug 19 11:10:34 PDT 2011


Revision: 8001
          http://trac.macosforge.org/projects/calendarserver/changeset/8001
Author:   cdaboo at apple.com
Date:     2011-08-19 11:10:34 -0700 (Fri, 19 Aug 2011)
Log Message:
-----------
Fix typo and counter.

Modified Paths:
--------------
    CalendarServer/trunk/twistedcaldav/upgrade.py

Modified: CalendarServer/trunk/twistedcaldav/upgrade.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/upgrade.py	2011-08-19 18:09:02 UTC (rev 8000)
+++ CalendarServer/trunk/twistedcaldav/upgrade.py	2011-08-19 18:10:34 UTC (rev 8001)
@@ -432,8 +432,11 @@
                         if len(second) == 2:
                             secondPath = os.path.join(firstPath, second)
                             for home in os.listdir(secondPath):
+                                homePath = os.path.join(secondPath, home)
+                                if not os.path.isdir(homePath):
+                                    # Skip non-directories
+                                    continue
                                 total += 1
-                                homePath = os.path.join(secondPath, home)
                                 inboxPath = os.path.join(homePath, "inbox")
                                 if os.path.exists(inboxPath):
                                     for inboxItem in os.listdir(inboxPath):
@@ -461,7 +464,7 @@
                                 for home in os.listdir(secondPath):
                                     homePath = os.path.join(secondPath, home)
 
-                                    if not os.path.isdir(oldHome):
+                                    if not os.path.isdir(homePath):
                                         # Skip non-directories
                                         continue
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20110819/9bd0426f/attachment-0001.html>


More information about the calendarserver-changes mailing list