[Jython-checkins] jython: #2016: Fixing the lack of ssl.makefile

alan.kennedy jython-checkins at python.org
Fri Mar 1 00:06:16 CET 2013


http://hg.python.org/jython/rev/baf84d8e91d0
changeset:   7071:baf84d8e91d0
user:        Alan Kennedy <alan at xhaus.com>
date:        Thu Feb 28 23:03:56 2013 +0000
summary:
  #2016: Fixing the lack of ssl.makefile

files:
  Lib/socket.py |  6 ++++++
  1 files changed, 6 insertions(+), 0 deletions(-)


diff --git a/Lib/socket.py b/Lib/socket.py
--- a/Lib/socket.py
+++ b/Lib/socket.py
@@ -1856,6 +1856,9 @@
 
     send = sendall = write
 
+    def makefile(self, mode='r', bufsize=-1):
+        return _fileobject(self, mode, bufsize)
+
     def _get_server_cert(self):
         return self.java_ssl_socket.getSession().getPeerCertificates()[0]
 
@@ -1869,6 +1872,9 @@
         cert = self._get_server_cert()
         return cert.getIssuerDN().toString()
 
+    def close(self):
+        self.jython_socket_wrapper.close()
+
 def test():
     s = socket(AF_INET, SOCK_STREAM)
     s.connect(("", 80))

-- 
Repository URL: http://hg.python.org/jython


More information about the Jython-checkins mailing list