summaryrefslogtreecommitdiff
path: root/Lib/ntpath.py
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2002-10-09 07:56:04 +0000
committerTim Peters <tim.peters@gmail.com>2002-10-09 07:56:04 +0000
commit4248dcd132aa8b8210bda67159241b4d1099765d (patch)
treed20d3a7a4adda15d7b51a8dae81be41a7851f469 /Lib/ntpath.py
parent153e32b1aadfdd6069ef67c7911aa3b18fd1ac49 (diff)
downloadcpython-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.py3
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)