mirror of
				https://github.com/python/cpython.git
				synced 2025-10-30 21:21:22 +00:00 
			
		
		
		
	avoid crash in open_ftp when no host in url
This commit is contained in:
		
							parent
							
								
									5e334d9823
								
							
						
					
					
						commit
						d66acb45f8
					
				
					 1 changed files with 1 additions and 0 deletions
				
			
		|  | @ -169,6 +169,7 @@ def open_local_file(self, url): | |||
| 	# Use FTP protocol | ||||
| 	def open_ftp(self, url): | ||||
| 		host, file = splithost(url) | ||||
| 		if not host: raise IOError, ('ftp error', 'no host given') | ||||
| 		host, port = splitport(host) | ||||
| 		host = socket.gethostbyname(host) | ||||
| 		if not port: | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Guido van Rossum
						Guido van Rossum