Skip to content

Commit

Permalink
more java.lang.Strings to regular str instead of unicode
Browse files Browse the repository at this point in the history
  • Loading branch information
pjenvey committed Jan 23, 2009
1 parent 2490b8e commit 324eeb5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Lib/os.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,9 @@ def get_os_type():
"""
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:
Expand Down
3 changes: 2 additions & 1 deletion Lib/platform.py
Original file line number Diff line number Diff line change
Expand Up @@ -624,8 +624,9 @@ def mac_ver(release='',versioninfo=('','',''),machine=''):
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

Expand Down

0 comments on commit 324eeb5

Please sign in to comment.