[Python-checkins] r68092 - python/trunk/Lib/ssl.py

benjamin.peterson python-checkins at python.org
Wed Dec 31 05:08:55 CET 2008


Author: benjamin.peterson
Date: Wed Dec 31 05:08:55 2008
New Revision: 68092

Log:
fix name collision issues

Modified:
   python/trunk/Lib/ssl.py

Modified: python/trunk/Lib/ssl.py
==============================================================================
--- python/trunk/Lib/ssl.py	(original)
+++ python/trunk/Lib/ssl.py	Wed Dec 31 05:08:55 2008
@@ -74,7 +74,7 @@
      SSL_ERROR_EOF, \
      SSL_ERROR_INVALID_ERROR_CODE
 
-from socket import socket, _fileobject
+from socket import socket, _fileobject, error as socket_error
 from socket import getnameinfo as _getnameinfo
 import base64        # for DER-to-PEM translation
 
@@ -103,7 +103,7 @@
         # see if it's connected
         try:
             socket.getpeername(self)
-        except socket.error:
+        except socket_error:
             # no, no connection yet
             self._sslobj = None
         else:
@@ -441,7 +441,7 @@
                             PROTOCOL_SSLv23, None)
     try:
         sock.getpeername()
-    except socket.error:
+    except socket_error:
         # no, no connection yet
         pass
     else:


More information about the Python-checkins mailing list