mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 05:31:20 +00:00 
			
		
		
		
	Fix a problem in site.py which triggers in case sys.path is empty.
Bugfix candidate for 2.2.2.
This commit is contained in:
		
							parent
							
								
									01824bf50c
								
							
						
					
					
						commit
						7ccd30fa43
					
				
					 1 changed files with 2 additions and 1 deletions
				
			
		|  | @ -94,7 +94,8 @@ def makepath(*paths): | ||||||
| # (especially for Guido :-) | # (especially for Guido :-) | ||||||
| # XXX This should not be part of site.py, since it is needed even when | # XXX This should not be part of site.py, since it is needed even when | ||||||
| # using the -S option for Python.  See http://www.python.org/sf/586680 | # using the -S option for Python.  See http://www.python.org/sf/586680 | ||||||
| if os.name == "posix" and os.path.basename(sys.path[-1]) == "Modules": | if (os.name == "posix" and sys.path and  | ||||||
|  |     os.path.basename(sys.path[-1]) == "Modules"): | ||||||
|     from distutils.util import get_platform |     from distutils.util import get_platform | ||||||
|     s = "build/lib.%s-%.3s" % (get_platform(), sys.version) |     s = "build/lib.%s-%.3s" % (get_platform(), sys.version) | ||||||
|     s = os.path.join(os.path.dirname(sys.path[-1]), s) |     s = os.path.join(os.path.dirname(sys.path[-1]), s) | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Marc-André Lemburg
						Marc-André Lemburg