[Python-checkins] python/dist/src/Lib ntpath.py,1.50,1.51

tim_one@users.sourceforge.net tim_one@users.sourceforge.net
Wed, 09 Oct 2002 00:56:07 -0700


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

Modified Files:
	ntpath.py 
Log Message:
Don't try to access sys.getwindowsversion unless it exists (ntpath is
imported on systems other than Windows, and in particular is imported
by test___all__; the compile farm reported that all Linux tests failed
due to this; isn't anyone in PythonDevLand running CVS on Linux?!).


Index: ntpath.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/ntpath.py,v
retrieving revision 1.50
retrieving revision 1.51
diff -C2 -d -r1.50 -r1.51
*** ntpath.py	8 Oct 2002 02:44:30 -0000	1.50
--- ntpath.py	9 Oct 2002 07:56:04 -0000	1.51
***************
*** 480,482 ****
  realpath = abspath
  # Win9x family and earlier have no Unicode filename support.
! supports_unicode_filenames = sys.getwindowsversion()[3] >= 2
--- 480,483 ----
  realpath = abspath
  # Win9x family and earlier have no Unicode filename support.
! supports_unicode_filenames = (hasattr(sys, "getwindowsversion") and
!                               sys.getwindowsversion()[3] >= 2)