[Zope3-checkins] CVS: Zope3/src/zope/server/linereceiver - linecommandparser.py:1.3 lineserverchannel.py:1.4 linetask.py:1.3

Steve Alexander steve@cat-box.net
Wed, 4 Jun 2003 04:41:04 -0400


Update of /cvs-repository/Zope3/src/zope/server/linereceiver
In directory cvs.zope.org:/tmp/cvs-serv23057/src/zope/server/linereceiver

Modified Files:
	linecommandparser.py lineserverchannel.py linetask.py 
Log Message:
New style implements(), fixed up some formatting.


=== Zope3/src/zope/server/linereceiver/linecommandparser.py 1.2 => 1.3 ===
--- Zope3/src/zope/server/linereceiver/linecommandparser.py:1.2	Wed Dec 25 09:15:26 2002
+++ Zope3/src/zope/server/linereceiver/linecommandparser.py	Wed Jun  4 04:40:33 2003
@@ -17,12 +17,13 @@
 """
 
 from zope.server.interfaces import IStreamConsumer
+from zope.interface import implements
 
 
 class LineCommandParser:
     """Line Command parser. Arguments are left alone for now."""
 
-    __implements__ = IStreamConsumer
+    implements(IStreamConsumer)
 
     # See IStreamConsumer
     completed = 0


=== Zope3/src/zope/server/linereceiver/lineserverchannel.py 1.3 => 1.4 ===
--- Zope3/src/zope/server/linereceiver/lineserverchannel.py:1.3	Thu Mar 13 13:49:18 2003
+++ Zope3/src/zope/server/linereceiver/lineserverchannel.py	Wed Jun  4 04:40:33 2003
@@ -23,15 +23,11 @@
 from zope.server.linereceiver.linecommandparser import LineCommandParser
 from zope.server.linereceiver.linetask import LineTask
 
-
 DEBUG = os.environ.get('ZOPE_SERVER_DEBUG')
 
-
 class LineServerChannel(ServerChannelBase):
     """The Line Server Channel represents a connection to a particular
        client. We can therefore store information here."""
-
-    __implements__ = ServerChannelBase.__implements__
 
     # Wrapper class that is used to execute a command in a different thread
     task_class = LineTask


=== Zope3/src/zope/server/linereceiver/linetask.py 1.2 => 1.3 ===
--- Zope3/src/zope/server/linereceiver/linetask.py:1.2	Wed Dec 25 09:15:26 2002
+++ Zope3/src/zope/server/linereceiver/linetask.py	Wed Jun  4 04:40:33 2003
@@ -19,15 +19,14 @@
 import socket
 import time
 from zope.server.interfaces import ITask
+from zope.interface import implements
 
 
 class LineTask:
     """This is a generic task that can be used with command line
        protocols to handle commands in a separate thread.
     """
-
-    __implements__ = ITask
-
+    implements(ITask)
 
     def __init__(self, channel, command, m_name):
         self.channel = channel
@@ -53,12 +52,10 @@
         finally:
             self.channel.end_task(self.close_on_finish)
 
-
     def cancel(self):
         'See ITask'
         self.channel.close_when_done()
 
-
     def defer(self):
         'See ITask'
         pass
@@ -66,7 +63,6 @@
     def start(self):
         now = time.time()
         self.start_time = now
-
 
     def finish(self):
         hit_log = self.channel.server.hit_log