mirror of
				https://github.com/python/cpython.git
				synced 2025-10-30 21:21:22 +00:00 
			
		
		
		
	Don't remove non-directories from sys.path on the mac: files
can be on sys.path too.
This commit is contained in:
		
							parent
							
								
									591f71b1d4
								
							
						
					
					
						commit
						31b5323c84
					
				
					 1 changed files with 3 additions and 2 deletions
				
			
		|  | @ -80,8 +80,9 @@ def makepath(*paths): | |||
| _dirs_in_sys_path = {} | ||||
| for dir in sys.path: | ||||
|     # Filter out paths that don't exist, but leave in the empty string | ||||
|     # since it's a special case. | ||||
|     if dir and not os.path.isdir(dir): | ||||
|     # since it's a special case. Except on the mac, where files are legal | ||||
|     # in sys.path. | ||||
|     if dir and not os.path.isdir(dir) and sys.platform != 'mac': | ||||
|         continue | ||||
|     dir, dircase = makepath(dir) | ||||
|     if not _dirs_in_sys_path.has_key(dircase): | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Jack Jansen
						Jack Jansen