From 26bc25a6c4c377f553ff401dd993d8196da9438d Mon Sep 17 00:00:00 2001 From: Tim Peters Date: Wed, 9 Oct 2002 07:56:04 +0000 Subject: 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?!). --- Lib/ntpath.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) -- cgit v0.12