[Zodb-checkins] SVN: ZODB/trunk/src/ZEO/zrpc/connection.py Gave delay objects a repr for debugging purposes.
Jim Fulton
jim at zope.com
Tue May 4 10:41:32 EDT 2010
Log message for revision 111922:
Gave delay objects a repr for debugging purposes.
Changed:
U ZODB/trunk/src/ZEO/zrpc/connection.py
-=-
Modified: ZODB/trunk/src/ZEO/zrpc/connection.py
===================================================================
--- ZODB/trunk/src/ZEO/zrpc/connection.py 2010-05-04 14:21:47 UTC (rev 111921)
+++ ZODB/trunk/src/ZEO/zrpc/connection.py 2010-05-04 14:41:32 UTC (rev 111922)
@@ -44,17 +44,25 @@
the mainloop from sending a response.
"""
+ msgid = conn = sent = None
+
def set_sender(self, msgid, conn):
self.msgid = msgid
self.conn = conn
def reply(self, obj):
+ self.sent = 'reply'
self.conn.send_reply(self.msgid, obj)
def error(self, exc_info):
+ self.sent = 'error'
log("Error raised in delayed method", logging.ERROR, exc_info=True)
self.conn.return_error(self.msgid, *exc_info[:2])
+ def __repr__(self):
+ return "%s[%s, %r, %r, %r]" % (
+ self.__class__.__name__, id(self), self.msgid, self.conn, self.sent)
+
class Result(Delay):
def __init__(self, *args):
More information about the Zodb-checkins
mailing list