[CalendarServer-changes] [12058] CalendarServer/trunk/twext/application/masterchild.py

source_changes at macosforge.org source_changes at macosforge.org
Wed Mar 12 11:16:47 PDT 2014


Revision: 12058
          http://trac.calendarserver.org//changeset/12058
Author:   wsanchez at apple.com
Date:     2013-12-12 15:16:57 -0800 (Thu, 12 Dec 2013)
Log Message:
-----------
More cleanup

Modified Paths:
--------------
    CalendarServer/trunk/twext/application/masterchild.py

Modified: CalendarServer/trunk/twext/application/masterchild.py
===================================================================
--- CalendarServer/trunk/twext/application/masterchild.py	2013-12-12 19:27:46 UTC (rev 12057)
+++ CalendarServer/trunk/twext/application/masterchild.py	2013-12-12 23:16:57 UTC (rev 12058)
@@ -105,7 +105,7 @@
                 "Invalid port number {0}: {1}".format(port, e)
             )
 
-        protocols = self.setdefault("protocol", [])
+        protocols = self.setdefault("protocols", [])
 
         for (otherProtocol, otherPort) in protocols:
             # FIXME: Raise here because we don't properly handle multiple
@@ -126,8 +126,8 @@
 
 
     def postOptions(self):
-        for parameter in ("protocol",):
-            if parameter not in self:
+        for (parameter, key) in [("protocol", "protocols")]:
+            if key not in self:
                 raise UsageError("{0} parameter is required".format(parameter))
 
 
@@ -298,7 +298,7 @@
     def makeService(self, options):
         service = MasterService()
 
-        for protocol, port in options["protocol"]:
+        for protocol, port in options["protocols"]:
             service.addProtocol(protocol, port)
 
         return service
@@ -618,24 +618,17 @@
     """
 
     showAttributes = (
-        "started",
         "acknowledged",
         "unacknowledged",
         "unclosed",
     )
 
 
-    def __init__(
-        self, started=0,
-        acknowledged=0, unacknowledged=0,
-        abandoned=0, unclosed=0
-    ):
+    def __init__(self, acknowledged=0, unacknowledged=0, unclosed=0):
         """
         Create a L{ConnectionStatus} with a number of sent connections and a
         number of un-acknowledged connections.
 
-        @param started: The number of times this worker has been started.
-
         @param acknowledged: the number of connections which we know the
             subprocess to be presently processing; i.e. those which have been
             transmitted to the subprocess.
@@ -647,7 +640,6 @@
         @param unclosed: The number of sockets which have been sent to the
             subprocess but not yet closed.
         """
-        self.started = started
         self.acknowledged = acknowledged
         self.unacknowledged = unacknowledged
         self.unclosed = unclosed
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20140312/262f9b50/attachment.html>


More information about the calendarserver-changes mailing list