diff options
author | Marc-André Lemburg <mal@egenix.com> | 2007-06-12 09:26:49 (GMT) |
---|---|---|
committer | Marc-André Lemburg <mal@egenix.com> | 2007-06-12 09:26:49 (GMT) |
commit | b24cd0f05af4555edafe764ef4ac1513451685cc (patch) | |
tree | 8084638fcd8a6f3b5fe16ca5e8a2ad3e5df3b6ed /Lib/platform.py | |
parent | 0e09788eda299728b3354ce015079fafe7bc396c (diff) | |
download | cpython-b24cd0f05af4555edafe764ef4ac1513451685cc.zip cpython-b24cd0f05af4555edafe764ef4ac1513451685cc.tar.gz cpython-b24cd0f05af4555edafe764ef4ac1513451685cc.tar.bz2 |
Add patch #1726668: Windows Vista support.
Diffstat (limited to 'Lib/platform.py')
-rwxr-xr-x | Lib/platform.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/Lib/platform.py b/Lib/platform.py index f02021e..af8acfa 100755 --- a/Lib/platform.py +++ b/Lib/platform.py @@ -600,6 +600,16 @@ def win32_ver(release='',version='',csd='',ptype=''): release = '2003Server' else: release = 'post2003' + elif maj == 6: + if min == 0: + # Per http://msdn2.microsoft.com/en-us/library/ms724429.aspx + productType = GetVersionEx(1)[8] + if productType == 1: # VER_NT_WORKSTATION + release = 'Vista' + else: + release = '2008Server' + else: + release = 'post2008Server' else: if not release: # E.g. Win3.1 with win32s @@ -1068,6 +1078,16 @@ def uname(): # (_syscmd_ver() tends to return the vendor name as well) if system == 'Microsoft Windows': system = 'Windows' + elif system == 'Microsoft' and release == 'Windows': + # Under Windows Vista and Windows Server 2008, + # Microsoft changed the output of the ver command. The + # release is no longer printed. This causes the + # system and release to be misidentified. + system = 'Windows' + if '6.0' == version[:3]: + release = 'Vista' + else: + release = '' # In case we still don't know anything useful, we'll try to # help ourselves |