[Jython-checkins] jython: Temporary fix for #2016: ssl sockets have broken recv() and makefile()
alan.kennedy
jython-checkins at python.org
Mon Feb 25 10:08:19 CET 2013
http://hg.python.org/jython/rev/ae103c4e1aef
changeset: 7064:ae103c4e1aef
user: Alan Kennedy <alan at xhaus.com>
date: Mon Feb 25 09:06:24 2013 +0000
summary:
Temporary fix for #2016: ssl sockets have broken recv() and makefile()
files:
Lib/socket.py | 9 ++++-----
1 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/Lib/socket.py b/Lib/socket.py
--- a/Lib/socket.py
+++ b/Lib/socket.py
@@ -1836,11 +1836,6 @@
java_ssl_socket.startHandshake()
return java_ssl_socket
- def __getattr__(self, attr_name):
- if hasattr(self.jython_socket_wrapper, attr_name):
- return getattr(self.jython_socket_wrapper, attr_name)
- raise AttributeError(attr_name)
-
@raises_java_exception
def read(self, n=4096):
data = jarray.zeros(n, 'b')
@@ -1851,12 +1846,16 @@
data = data[:m]
return data.tostring()
+ recv = read
+
@raises_java_exception
def write(self, s):
self._out_buf.write(s)
self._out_buf.flush()
return len(s)
+ send = sendall = write
+
def _get_server_cert(self):
return self.java_ssl_socket.getSession().getPeerCertificates()[0]
--
Repository URL: http://hg.python.org/jython
More information about the Jython-checkins
mailing list