Fix for http://bitbucket.org/which_linden/eventlet/issue/2/more-issues-with-python-26. Thanks for the report, anonymous. :-)
This commit is contained in:
@@ -188,6 +188,10 @@ class GreenSocket(object):
|
||||
# when client calls setblocking(0) or settimeout(0) the socket must
|
||||
# act non-blocking
|
||||
self.act_non_blocking = False
|
||||
|
||||
@property
|
||||
def _sock(self):
|
||||
return self
|
||||
|
||||
@property
|
||||
def family(self):
|
||||
|
@@ -219,6 +219,15 @@ class TestGreenIo(LimitedTestCase):
|
||||
|
||||
self.assert_(len(results1) > 0)
|
||||
self.assert_(len(results2) > 0)
|
||||
|
||||
def test_wrap_socket(self):
|
||||
try:
|
||||
import ssl
|
||||
except ImportError:
|
||||
pass # pre-2.6
|
||||
else:
|
||||
sock = api.tcp_listener(('127.0.0.1', 0))
|
||||
ssl_sock = ssl.wrap_socket(sock)
|
||||
|
||||
|
||||
class SSLTest(LimitedTestCase):
|
||||
|
Reference in New Issue
Block a user