From: <pj...@us...> - 2008-11-21 02:00:18
|
Revision: 5596 http://jython.svn.sourceforge.net/jython/?rev=5596&view=rev Author: pjenvey Date: 2008-11-21 02:00:11 +0000 (Fri, 21 Nov 2008) Log Message: ----------- fix handling of null prefix/exec_prefix values now that they're PyObjects fixes #1173 thanks boisgera Modified Paths: -------------- trunk/jython/src/org/python/core/PySystemState.java Modified: trunk/jython/src/org/python/core/PySystemState.java =================================================================== --- trunk/jython/src/org/python/core/PySystemState.java 2008-11-20 23:44:08 UTC (rev 5595) +++ trunk/jython/src/org/python/core/PySystemState.java 2008-11-21 02:00:11 UTC (rev 5596) @@ -459,8 +459,12 @@ } catch (Exception exc) { } } - PySystemState.prefix = Py.newString(prefix); - PySystemState.exec_prefix = Py.newString(exec_prefix); + if (prefix != null) { + PySystemState.prefix = Py.newString(prefix); + } + if (exec_prefix != null) { + PySystemState.exec_prefix = Py.newString(exec_prefix); + } try { String jythonpath = System.getenv("JYTHONPATH"); if (jythonpath != null) { @@ -626,7 +630,7 @@ } cachedir = new File(props.getProperty(PYTHON_CACHEDIR, CACHEDIR_DEFAULT_NAME)); if (!cachedir.isAbsolute()) { - cachedir = new File(prefix.toString(), cachedir.getPath()); + cachedir = new File(prefix == null ? null : prefix.toString(), cachedir.getPath()); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |