]> granicus.if.org Git - python/commitdiff
Fix #16176. Properly identify Windows 8 via platform.platform()
authorBrian Curtin <brian@python.org>
Thu, 11 Oct 2012 21:16:50 +0000 (16:16 -0500)
committerBrian Curtin <brian@python.org>
Thu, 11 Oct 2012 21:16:50 +0000 (16:16 -0500)
Add handling of the 6.2 release line, aka Windows 8 and Windows 2012 Server.

Lib/platform.py
Misc/NEWS

index 20b91752f311bbd22fd9bb6dd8bcd1b56d9b907b..c0016a8198cdbbdb7e2665d0209fb585c2e38b22 100755 (executable)
@@ -673,8 +673,13 @@ def win32_ver(release='',version='',csd='',ptype=''):
                     release = '7'
                 else:
                     release = '2008ServerR2'
+            elif min == 2:
+                if product_type == VER_NT_WORKSTATION:
+                    release = '8'
+                else:
+                    release = '2012Server'
             else:
-                release = 'post2008Server'
+                release = 'post2012Server'
 
     else:
         if not release:
index fb843126a30166af350d949a6a90c0318e199d3d..7d45a89caa1c6f4766ff4a9de45f7bb73e58efb2 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -119,6 +119,8 @@ Core and Builtins
 Library
 -------
 
+- Issue #16176: Properly identify Windows 8 via platform.platform()
+
 - Issue #15756: subprocess.poll() now properly handles errno.ECHILD to
   return a returncode of 0 when the child has already exited or cannot
   be waited on.