mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 21:51:50 +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_EOF, \ | ||||||
|      SSL_ERROR_INVALID_ERROR_CODE |      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 | from socket import getnameinfo as _getnameinfo | ||||||
| import base64        # for DER-to-PEM translation | import base64        # for DER-to-PEM translation | ||||||
| 
 | 
 | ||||||
|  | @ -103,7 +103,7 @@ def __init__(self, sock, keyfile=None, certfile=None, | ||||||
|         # see if it's connected |         # see if it's connected | ||||||
|         try: |         try: | ||||||
|             socket.getpeername(self) |             socket.getpeername(self) | ||||||
|         except socket.error: |         except socket_error: | ||||||
|             # no, no connection yet |             # no, no connection yet | ||||||
|             self._sslobj = None |             self._sslobj = None | ||||||
|         else: |         else: | ||||||
|  | @ -441,7 +441,7 @@ def sslwrap_simple (sock, keyfile=None, certfile=None): | ||||||
|                             PROTOCOL_SSLv23, None) |                             PROTOCOL_SSLv23, None) | ||||||
|     try: |     try: | ||||||
|         sock.getpeername() |         sock.getpeername() | ||||||
|     except socket.error: |     except socket_error: | ||||||
|         # no, no connection yet |         # no, no connection yet | ||||||
|         pass |         pass | ||||||
|     else: |     else: | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Benjamin Peterson
						Benjamin Peterson