[CalendarServer-changes] [8543] CalendarServer/trunk/calendarserver/tools/shell/vfs.py

source_changes at macosforge.org source_changes at macosforge.org
Mon Jan 16 13:53:26 PST 2012


Revision: 8543
          http://trac.macosforge.org/projects/calendarserver/changeset/8543
Author:   wsanchez at apple.com
Date:     2012-01-16 13:53:25 -0800 (Mon, 16 Jan 2012)
Log Message:
-----------
Handle missing child in RecordFolder

Modified Paths:
--------------
    CalendarServer/trunk/calendarserver/tools/shell/vfs.py

Modified: CalendarServer/trunk/calendarserver/tools/shell/vfs.py
===================================================================
--- CalendarServer/trunk/calendarserver/tools/shell/vfs.py	2012-01-16 21:47:36 UTC (rev 8542)
+++ CalendarServer/trunk/calendarserver/tools/shell/vfs.py	2012-01-16 21:53:25 UTC (rev 8543)
@@ -21,7 +21,7 @@
 
 from cStringIO import StringIO
 
-from twisted.python import log
+#from twisted.python import log
 from twisted.internet.defer import succeed
 from twisted.internet.defer import inlineCallbacks, returnValue
 
@@ -172,14 +172,14 @@
     def _recordForName(self, name):
         recordTypeAttr = "recordType_" + self.recordType
         recordType = getattr(self.service.directory, recordTypeAttr)
-
-        log.msg("Record type = %s" % (recordType,))
-
         return self.service.directory.recordWithShortName(recordType, name)
 
     def child(self, name):
         record = self._recordForName(name)
-        log.msg("Record = %s" % (record,))
+
+        if record is None:
+            return Folder.child(self, name)
+
         return PrincipalHomeFolder(
             self.service,
             self.path + (record.uid,),
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20120116/1d7d09f6/attachment.html>


More information about the calendarserver-changes mailing list