diff options
author | Tim Peters <tim.peters@gmail.com> | 2002-10-09 07:56:04 (GMT) |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2002-10-09 07:56:04 (GMT) |
commit | 26bc25a6c4c377f553ff401dd993d8196da9438d (patch) | |
tree | 238711fd06a27e319550396ebfc3933b092486de /Lib/ntpath.py | |
parent | 2a182dbf3f2520ad753792068391775d102b13df (diff) | |
download | cpython-26bc25a6c4c377f553ff401dd993d8196da9438d.zip cpython-26bc25a6c4c377f553ff401dd993d8196da9438d.tar.gz cpython-26bc25a6c4c377f553ff401dd993d8196da9438d.tar.bz2 |
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 73b7a2f..0f1dd4d 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) |