[CalendarServer-changes] [7485] CalendarServer/branches/users/glyph/new-export/calendarserver/tools
source_changes at macosforge.org
source_changes at macosforge.org
Mon May 16 07:49:20 PDT 2011
Revision: 7485
http://trac.macosforge.org/projects/calendarserver/changeset/7485
Author: glyph at apple.com
Date: 2011-05-16 07:49:19 -0700 (Mon, 16 May 2011)
Log Message:
-----------
skip the inbox when listing calendars.
Modified Paths:
--------------
CalendarServer/branches/users/glyph/new-export/calendarserver/tools/export.py
CalendarServer/branches/users/glyph/new-export/calendarserver/tools/test/test_export.py
Modified: CalendarServer/branches/users/glyph/new-export/calendarserver/tools/export.py
===================================================================
--- CalendarServer/branches/users/glyph/new-export/calendarserver/tools/export.py 2011-05-16 14:49:07 UTC (rev 7484)
+++ CalendarServer/branches/users/glyph/new-export/calendarserver/tools/export.py 2011-05-16 14:49:19 UTC (rev 7485)
@@ -179,12 +179,14 @@
directory = exportService.directoryService()
record = directory.recordWithShortName(self.recordType, self.shortName)
home = yield txn.calendarHomeWithUID(record.guid, True)
+ result = []
if self.collections:
- result = []
for collection in self.collections:
result.append((yield home.calendarWithName(collection)))
else:
- result = yield home.calendars()
+ for collection in (yield home.calendars()):
+ if collection.name() != 'inbox':
+ result.append(collection)
returnValue(result)
Modified: CalendarServer/branches/users/glyph/new-export/calendarserver/tools/test/test_export.py
===================================================================
--- CalendarServer/branches/users/glyph/new-export/calendarserver/tools/test/test_export.py 2011-05-16 14:49:07 UTC (rev 7484)
+++ CalendarServer/branches/users/glyph/new-export/calendarserver/tools/test/test_export.py 2011-05-16 14:49:19 UTC (rev 7485)
@@ -432,6 +432,10 @@
yield populateCalendarsFrom(
{
"user02": {
+ # TODO: more direct test for skipping inbox
+ "inbox": {
+ "inbox-item.ics": (valentines, {})
+ },
"calendar1": {
"peruser.ics": (dataForTwoUsers, {}), # EST
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20110516/e21ff959/attachment.html>
More information about the calendarserver-changes
mailing list