[Zodb-checkins] SVN: ZODB/branches/jim-zrpc/src/ZEO/zrpc/connection.py Collapse some easily collapsable methods.

Jim Fulton jim at zope.com
Wed Jan 27 13:18:57 EST 2010


Log message for revision 108576:
  Collapse some easily collapsable methods.
  
  Get rid of an unused method.
  

Changed:
  U   ZODB/branches/jim-zrpc/src/ZEO/zrpc/connection.py

-=-
Modified: ZODB/branches/jim-zrpc/src/ZEO/zrpc/connection.py
===================================================================
--- ZODB/branches/jim-zrpc/src/ZEO/zrpc/connection.py	2010-01-27 18:07:57 UTC (rev 108575)
+++ ZODB/branches/jim-zrpc/src/ZEO/zrpc/connection.py	2010-01-27 18:18:56 UTC (rev 108576)
@@ -651,14 +651,6 @@
         finally:
             self.msgid_lock.release()
 
-    def __call_message(self, method, args, async):
-        # compute a message and return it
-        msgid = self.__new_msgid()
-        if debug_zrpc:
-            self.log("send msg: %d, %d, %s, ..." % (msgid, async, method),
-                     level=TRACE)
-        return self.marshal.encode(msgid, async, method, args)
-
     def send_call(self, method, args, async=False):
         # send a message and return its msgid
         msgid = self.__new_msgid()
@@ -693,19 +685,13 @@
 
     def __outputIterator(self, iterator):
         for method, args in iterator:
-            yield self.__call_message(method, args, 1)
+            if debug_zrpc:
+                self.log("__outputIterator: %s, ..." % (method), level=TRACE)
+            yield self.marshal.encode(0, 1, method, args)
 
-
     def handle_reply(self, msgid, ret):
         assert msgid == -1 and ret is None
 
-    def flush(self):
-        """Invoke poll() until the output buffer is empty."""
-        if debug_zrpc:
-            self.log("flush")
-        while self.writable():
-            self.poll()
-
     def poll(self):
         """Invoke asyncore mainloop to get pending message out."""
         if debug_zrpc:



More information about the Zodb-checkins mailing list