[Python-checkins] python/dist/src/Lib site.py,1.44,1.45

lemburg@users.sourceforge.net lemburg@users.sourceforge.net
Thu, 19 Sep 2002 04:11:29 -0700


Update of /cvsroot/python/python/dist/src/Lib
In directory usw-pr-cvs1:/tmp/cvs-serv17853/Lib

Modified Files:
	site.py 
Log Message:
Fix a problem in site.py which triggers in case sys.path is empty.

Bugfix candidate for 2.2.2.



Index: site.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/site.py,v
retrieving revision 1.44
retrieving revision 1.45
diff -C2 -d -r1.44 -r1.45
*** site.py	25 Jul 2002 20:13:03 -0000	1.44
--- site.py	19 Sep 2002 11:11:27 -0000	1.45
***************
*** 95,99 ****
  # 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
! if os.name == "posix" and os.path.basename(sys.path[-1]) == "Modules":
      from distutils.util import get_platform
      s = "build/lib.%s-%.3s" % (get_platform(), sys.version)
--- 95,100 ----
  # 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
! if (os.name == "posix" and sys.path and 
!     os.path.basename(sys.path[-1]) == "Modules"):
      from distutils.util import get_platform
      s = "build/lib.%s-%.3s" % (get_platform(), sys.version)