[CalendarServer-changes] [9013] CalendarServer/trunk/calendarserver/tools/shell

source_changes at macosforge.org source_changes at macosforge.org
Tue Apr 10 13:14:05 PDT 2012


Revision: 9013
          http://trac.macosforge.org/projects/calendarserver/changeset/9013
Author:   wsanchez at apple.com
Date:     2012-04-10 13:14:05 -0700 (Tue, 10 Apr 2012)
Log Message:
-----------
Remove wd arg to CommandsBase.

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

Modified: CalendarServer/trunk/calendarserver/tools/shell/cmd.py
===================================================================
--- CalendarServer/trunk/calendarserver/tools/shell/cmd.py	2012-04-10 20:05:56 UTC (rev 9012)
+++ CalendarServer/trunk/calendarserver/tools/shell/cmd.py	2012-04-10 20:14:05 UTC (rev 9013)
@@ -27,7 +27,7 @@
 from txdav.common.icommondatastore import NotFoundError
 
 from calendarserver.tools.tables import Table
-from calendarserver.tools.shell.vfs import Folder
+from calendarserver.tools.shell.vfs import Folder, RootFolder
 
 class UsageError(Exception):
     """
@@ -45,11 +45,10 @@
 
 
 class CommandsBase(object):
-    def __init__(self, protocol, wd):
-        self.service  = protocol.service
+    def __init__(self, protocol):
         self.protocol = protocol
 
-        self.wd = wd
+        self.wd = RootFolder(protocol.service)
 
     @property
     def terminal(self):
@@ -419,7 +418,7 @@
 
             localVariables = dict(
                 self   = self,
-                store  = self.service.store,
+                store  = self.protocol.service.store,
                 schema = schema,
             )
 

Modified: CalendarServer/trunk/calendarserver/tools/shell/terminal.py
===================================================================
--- CalendarServer/trunk/calendarserver/tools/shell/terminal.py	2012-04-10 20:05:56 UTC (rev 9012)
+++ CalendarServer/trunk/calendarserver/tools/shell/terminal.py	2012-04-10 20:14:05 UTC (rev 9013)
@@ -131,7 +131,7 @@
         ReceiveLineProtocol.__init__(self)
         self.service = service
         self.inputLines = []
-        self.commands = commandsClass(self, RootFolder(service))
+        self.commands = commandsClass(self)
         self.activeCommand = None
         self.emulate = "emacs"
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20120410/443dc1e6/attachment.html>


More information about the calendarserver-changes mailing list