Brian Curtin <cur...@acm.org> added the comment:

The following little patch could do the trick.


--- platform.py (revision 82643)
+++ platform.py (working copy)
@@ -606,7 +606,9 @@
 
     # Find out the registry key and some general version infos
     winver = GetVersionEx()
-    maj,min,buildno,plat,csd = winver
+    # If sys.getwindowsversion in 3.2 gets used, it contains extra fields
+    # which don't get used. Always use slicing in order to stay compatible.
+    maj,min,buildno,plat,csd = winver[:5]
     version = '%i.%i.%i' % (maj,min,buildno & 0xFFFF)
     if hasattr(winver, "service_pack"):
         if winver.service_pack != "":

----------
components: +Library (Lib) -None
keywords: +needs review, patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue9202>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to