[Python-checkins] r79387 - python/trunk/Lib/test/test_ftplib.py

antoine.pitrou python-checkins at python.org
Wed Mar 24 23:12:16 CET 2010


Author: antoine.pitrou
Date: Wed Mar 24 23:12:15 2010
New Revision: 79387

Log:
Revert r79384 (the fix failed).



Modified:
   python/trunk/Lib/test/test_ftplib.py

Modified: python/trunk/Lib/test/test_ftplib.py
==============================================================================
--- python/trunk/Lib/test/test_ftplib.py	(original)
+++ python/trunk/Lib/test/test_ftplib.py	Wed Mar 24 23:12:15 2010
@@ -315,21 +315,12 @@
             raise
 
         def close(self):
-            ssl_want_read_or_write = False
             try:
                 if isinstance(self.socket, ssl.SSLSocket):
                     if self.socket._sslobj is not None:
-                        try:
-                            self.socket.unwrap()
-                        except ssl.SSLError, err:
-                            if err.args[0] in (ssl.SSL_ERROR_WANT_READ,
-                                               ssl.SSL_ERROR_WANT_WRITE):
-                                ssl_want_read_or_write = True
-                            else:
-                                raise
+                        self.socket.unwrap()
             finally:
-                if not ssl_want_read_or_write:
-                    super(SSLConnection, self).close()
+                super(SSLConnection, self).close()
 
 
     class DummyTLS_DTPHandler(SSLConnection, DummyDTPHandler):


More information about the Python-checkins mailing list