mirror of
https://github.com/python/cpython.git
synced 2025-11-24 20:30:18 +00:00
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?!).
This commit is contained in:
parent
2a182dbf3f
commit
26bc25a6c4
1 changed files with 2 additions and 1 deletions
|
|
@ -479,4 +479,5 @@ def abspath(path):
|
||||||
# realpath is a no-op on systems without islink support
|
# realpath is a no-op on systems without islink support
|
||||||
realpath = abspath
|
realpath = abspath
|
||||||
# Win9x family and earlier have no Unicode filename support.
|
# 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)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue