Commit 1c1db49c authored by Denis Bilenko's avatar Denis Bilenko

GreenSSL: add __repr__

parent 265225db
......@@ -261,6 +261,13 @@ class GreenSSL(GreenSocket):
else:
self.fd.set_connect_state()
def __repr__(self):
try:
fileno = self.fileno()
except Exception, ex:
fileno = str(ex)
return '<%s at %s fileno=%s timeout=%s state_string=%r>' % (type(self).__name__, hex(id(self)), fileno, self.timeout, self.fd.state_string())
def accept(self):
if self.timeout==0.0:
return self.fd.accept()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment