Mercurial > cpython-lru_cache-weakref
diff Lib/ntpath.py @ 25676:bac5a4932905 legacy-trunk
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?!).
| author | Tim Peters <tim.peters@gmail.com> |
|---|---|
| date | Wed, 09 Oct 2002 07:56:04 +0000 |
| parents | 4a825b902310 |
| children | 7babdaea7d19 |
line wrap: on
line diff
--- a/Lib/ntpath.py Wed Oct 09 01:07:11 2002 +0000 +++ b/Lib/ntpath.py Wed Oct 09 07:56:04 2002 +0000 @@ -479,4 +479,5 @@ # 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)
