[CalendarServer-changes] [7674] CalendarServer/branches/users/glyph/uidexport/calendarserver/tools

source_changes at macosforge.org source_changes at macosforge.org
Mon Jun 27 13:34:02 PDT 2011


Revision: 7674
          http://trac.macosforge.org/projects/calendarserver/changeset/7674
Author:   glyph at apple.com
Date:     2011-06-27 13:34:02 -0700 (Mon, 27 Jun 2011)
Log Message:
-----------
Rename HomeExporter to DirectoryExporter since its distinguishing characteristic should be the fact that it uses the directory service.

Modified Paths:
--------------
    CalendarServer/branches/users/glyph/uidexport/calendarserver/tools/export.py
    CalendarServer/branches/users/glyph/uidexport/calendarserver/tools/test/test_export.py

Modified: CalendarServer/branches/users/glyph/uidexport/calendarserver/tools/export.py
===================================================================
--- CalendarServer/branches/users/glyph/uidexport/calendarserver/tools/export.py	2011-06-27 20:33:17 UTC (rev 7673)
+++ CalendarServer/branches/users/glyph/uidexport/calendarserver/tools/export.py	2011-06-27 20:34:02 UTC (rev 7674)
@@ -78,7 +78,7 @@
     """
     Command-line options for 'calendarserver_export'
 
-    @ivar exporters: a list of L{HomeExporter} objects which can identify the
+    @ivar exporters: a list of L{DirectoryExporter} objects which can identify the
         calendars to export, given a directory service.  This list is built by
         parsing --record and --collection options.
     """
@@ -99,7 +99,7 @@
         Add a directory record's calendar home (format: 'recordType:shortName').
         """
         recordType, shortName = recordName.split(":", 1)
-        self.exporters.append(HomeExporter(recordType, shortName))
+        self.exporters.append(DirectoryExporter(recordType, shortName))
 
     opt_r = opt_record
 
@@ -145,10 +145,10 @@
 
 
 
-class HomeExporter(object):
+class DirectoryExporter(object):
     """
-    An exporter that constructs a list of calendars based on the UID or
-    directory services record ID of the home.
+    An exporter that constructs a list of calendars based on the directory
+    services record ID of the home.
 
     @ivar collections: A list of the names of collections that this exporter
         should enumerate.

Modified: CalendarServer/branches/users/glyph/uidexport/calendarserver/tools/test/test_export.py
===================================================================
--- CalendarServer/branches/users/glyph/uidexport/calendarserver/tools/test/test_export.py	2011-06-27 20:33:17 UTC (rev 7673)
+++ CalendarServer/branches/users/glyph/uidexport/calendarserver/tools/test/test_export.py	2011-06-27 20:34:02 UTC (rev 7674)
@@ -35,7 +35,7 @@
 
 from calendarserver.tools import export
 from calendarserver.tools.export import ExportOptions, main
-from calendarserver.tools.export import HomeExporter
+from calendarserver.tools.export import DirectoryExporter
 
 from twisted.python.filepath import FilePath
 from twistedcaldav.test.util import patchConfig
@@ -93,14 +93,14 @@
 
     def test_oneHome(self):
         """
-        One '--record' option will result in a single HomeExporter object with
-        no calendars in its list.
+        One '--record' option will result in a single DirectoryExporter object
+        with no calendars in its list.
         """
         eo = ExportOptions()
         eo.parseOptions(["--record", "users:bob"])
         self.assertEquals(len(eo.exporters), 1)
         exp = eo.exporters[0]
-        self.assertIsInstance(exp, HomeExporter)
+        self.assertIsInstance(exp, DirectoryExporter)
         self.assertEquals(exp.recordType, "users")
         self.assertEquals(exp.shortName, "bob")
         self.assertEquals(exp.collections, [])
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20110627/fdbe9836/attachment-0001.html>


More information about the calendarserver-changes mailing list