[Patches] [ python-Patches-1726668 ] platform.system() returns incorrect value in Vista

SourceForge.net noreply at sourceforge.net
Tue May 29 07:11:47 CEST 2007


Patches item #1726668, was opened at 2007-05-28 03:23
Message generated for change (Comment added) made by loewis
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1726668&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
>Category: None
>Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Benjamin Leppard (bleppard)
>Assigned to: M.-A. Lemburg (lemburg)
Summary: platform.system() returns incorrect value in Vista

Initial Comment:


On Microsoft Vista platform.system() returns 'Microsoft' and platform.release() returns 'Windows'

Under Microsoft Windows XP SP2 platform.system() returns 'Windows' and platform.release() returns 'XP'.

This is problem was caused by a change in the output of the "ver" command. In Windows XP SP2 "ver" outputted 'Microsoft Windows XP [Version 5.1.2600]'  In Microsoft Vista "ver" outputted 'Microsoft Windows [Version 6.0.6000]'. The lack of the 3rd word before version causes _syscmd_ver(...) in platform.py to return 'Microsoft' for system instead of 'Microsoft Windows'. This causes uname() to return the incorrect values. Both system() and release() call uname().

This problem occurs in the trunk.

I have attached a patch against the trunk svn that fixes the symptom of the problem in uname()

----------------------------------------------------------------------

>Comment By: Martin v. Löwis (loewis)
Date: 2007-05-29 07:11

Message:
Logged In: YES 
user_id=21627
Originator: NO

Reclassifying as a patch. Marc-Andre, can you take a look? If not, please
unassign.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1726668&group_id=5470


More information about the Patches mailing list