diff options
author | Tim Peters <tim.peters@gmail.com> | 2002-10-09 07:56:04 +0000 |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2002-10-09 07:56:04 +0000 |
commit | 4248dcd132aa8b8210bda67159241b4d1099765d (patch) | |
tree | d20d3a7a4adda15d7b51a8dae81be41a7851f469 /Lib/ntpath.py | |
parent | 153e32b1aadfdd6069ef67c7911aa3b18fd1ac49 (diff) | |
download | cpython-4248dcd132aa8b8210bda67159241b4d1099765d.tar.gz |
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?!).
Diffstat (limited to 'Lib/ntpath.py')
-rw-r--r-- | Lib/ntpath.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/ntpath.py b/Lib/ntpath.py index 73b7a2fdca..0f1dd4dc60 100644 --- a/Lib/ntpath.py +++ b/Lib/ntpath.py @@ -479,4 +479,5 @@ def abspath(path): # realpath is a no-op on systems without islink support realpath = abspath # Win9x family and earlier have no Unicode filename support. -supports_unicode_filenames = sys.getwindowsversion()[3] >= 2 +supports_unicode_filenames = (hasattr(sys, "getwindowsversion") and + sys.getwindowsversion()[3] >= 2) |