fix name collision issues

This commit is contained in:
Benjamin Peterson 2008-12-31 04:08:55 +00:00
parent 43ea6d9acc
commit 941db4d91f
1 changed files with 3 additions and 3 deletions

View File

@ -74,7 +74,7 @@ from _ssl import \
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 @@ class SSLSocket (socket):
# 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 @@ def sslwrap_simple (sock, keyfile=None, certfile=None):
PROTOCOL_SSLv23, None)
try:
sock.getpeername()
except socket.error:
except socket_error:
# no, no connection yet
pass
else: