From: <pj...@us...> - 2009-01-23 23:40:54
|
Revision: 5965 http://jython.svn.sourceforge.net/jython/?rev=5965&view=rev Author: pjenvey Date: 2009-01-23 23:40:46 +0000 (Fri, 23 Jan 2009) Log Message: ----------- more java.lang.Strings to regular str instead of unicode Modified Paths: -------------- trunk/jython/Lib/os.py trunk/jython/Lib/platform.py Modified: trunk/jython/Lib/os.py =================================================================== --- trunk/jython/Lib/os.py 2009-01-23 15:30:09 UTC (rev 5964) +++ trunk/jython/Lib/os.py 2009-01-23 23:40:46 UTC (rev 5965) @@ -83,9 +83,9 @@ """ os_name = sys.registry.getProperty('python.os') if os_name: - return str(os_name) + return asPyString(os_name) - os_name = str(java.lang.System.getProperty('os.name')) + os_name = asPyString(java.lang.System.getProperty('os.name')) os_type = None for type, (patterns, shell_commands) in _os_map.iteritems(): for pattern in patterns: Modified: trunk/jython/Lib/platform.py =================================================================== --- trunk/jython/Lib/platform.py 2009-01-23 15:30:09 UTC (rev 5964) +++ trunk/jython/Lib/platform.py 2009-01-23 23:40:46 UTC (rev 5965) @@ -624,8 +624,9 @@ def _java_getprop(name,default): from java.lang import System + from org.python.core.Py import newString try: - return System.getProperty(name) + return newString(System.getProperty(name)) except: return default This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |