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

Jim Fulton <[email protected]>
Newsgroups gmane.comp.python.zope.zodb.cvs
Message-ID <20100127181857.52C8F9417C__14481.9979592741$1264616536$gmane$org@cvs.zope.org>
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:
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.