mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 13:41:24 +00:00 
			
		
		
		
	fix name collision issues
This commit is contained in:
		
							parent
							
								
									43ea6d9acc
								
							
						
					
					
						commit
						941db4d91f
					
				
					 1 changed files with 3 additions and 3 deletions
				
			
		|  | @ -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 @@ def __init__(self, sock, keyfile=None, certfile=None, | |||
|         # 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: | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Benjamin Peterson
						Benjamin Peterson