Issue1553590

classification
Title: Logic bug in _getOsType for Windows 2003
Type: Severity: normal
Components: Library Versions:
Milestone:
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: cgroves, winkler1
Priority: normal Keywords:

Created on 2006-09-06.18:34:14 by winkler1, last changed 2006-09-06.23:53:13 by cgroves.

Messages
msg1220 (view) Author: Jeff Winkler (winkler1) Date: 2006-09-06.18:34:14
When running on Windows 2003 Server,
java.lang.System.getProperty( "os.name" ) returns
"Windows 2003". (Note: this doesn't seem to be
consistent. I've also seen it reported as Windows NT).
"Windows 2003" is not in the hardcoded list of windows
ID strings, so it defaults to posix, causing downstream
errors when calling os.system.

It's not possible to know ahead of time all the
possible windows flavors in the future - but it's a
safe bet they'll begin with "Windows".

Suggest the following at line 300 in javaos.py:

    _osTypeMap = (
        ( "dos", r"(dos)|(Windows 95)|(Windows
98)|(Windows ME)" ),
        ( "nt", r"(nt)|(Windows.*)" ),
msg1221 (view) Author: Charlie Groves (cgroves) Date: 2006-09-06.23:53:13
Logged In: YES 
user_id=1174327

This is fixed in 2.2alpha1 and onwards.  Unfortunately 2.1
won't see any updates so this won't be fixed there.  This
was discussed on jython-dev and the solution was just to
substitute a patched javaos.py in installations running on
Windows 2003 with code similar to yours.
History
Date User Action Args
2006-09-06 18:34:14winkler1create