[Zodb-checkins] CVS: Packages/ZEO - smac.py:1.9.6.3

jeremy@digicool.com jeremy@digicool.com
Wed, 18 Apr 2001 16:55:10 -0400 (EDT)


Update of /cvs-repository/Packages/ZEO
In directory korak:/tmp/cvs-serv8591

Modified Files:
      Tag: ZEO-ZRPC-Dev
	smac.py 
Log Message:
Fiddle with imports and remove commented-out lines



--- Updated File smac.py in package Packages/ZEO --
--- smac.py	2001/03/29 13:30:33	1.9.6.2
+++ smac.py	2001/04/18 20:55:09	1.9.6.3
@@ -87,8 +87,8 @@
 
 __version__ = "$Revision$"[11:-2]
 
-import asyncore, string, struct, zLOG, sys, Acquisition
-from zLOG import LOG, TRACE, ERROR, INFO
+import asyncore, string, struct, sys, Acquisition
+from zLOG import LOG, TRACE, ERROR, INFO, BLATHER
 from types import StringType
 
 class SizedMessageAsyncConnection(asyncore.dispatcher):
@@ -119,8 +119,6 @@
     def __nonzero__(self):
         return 1
 
-##    __read_inprogress = None
-
     def handle_read(self):
         # Use a single __inp buffer and integer indexes to make this
         # fast.
@@ -128,7 +126,6 @@
         if not d:
             return
 
-##        self.__read_inprogress = 1
         input_len = self.__input_len + len(d)
         msg_size = self.__msg_size
         state = self.__state
@@ -155,8 +152,6 @@
 
         offset = 0
         while (offset + msg_size) <= input_len:
-##            if state is None and msg_size != 4:
-##                print "OUT OF LUCK"
             msg = inp[offset:offset + msg_size]
             offset = offset + msg_size
             if state is None:
@@ -239,7 +234,6 @@
                 break # we can't write any more
             else:
                 del output[0]
-#        LOG(self._debug, INFO, "output written; remain=%d" % len(self.__output))
 
     def handle_close(self):
         self.close()
@@ -260,13 +254,12 @@
         # do two separate appends to avoid copying the message string
         self.__output.append(struct.pack(">i", len(message)))
         self.__output.append(message)
-#        LOG(self._debug, INFO, "output remain=%d" % len(self.__output))
 
-    def log_info(self, message, type='info'):
+    def log_info(self, message, type='trace'):
         if type == 'error':
             type = ERROR
         else:
-            type = INFO
+            type = TRACE
         LOG('ZEO', type, message)
 
     log = log_info