Update of /cvsroot/jython/jython/org/python/modules
In directory usw-pr-cvs1:/tmp/cvs-serv21480
Modified Files:
os.java
Log Message:
Check for a non-null prefix before using it.
Index: os.java
===================================================================
RCS file: /cvsroot/jython/jython/org/python/modules/os.java,v
retrieving revision 2.4
retrieving revision 2.5
diff -C2 -r2.4 -r2.5
*** os.java 2001/02/02 11:29:42 2.4
--- os.java 2001/02/07 09:26:19 2.5
***************
*** 9,16 ****
// An ugly hack, but it keeps the site.py from CPython2.0 happy
! public static String __file__ =
! Py.getSystemState().prefix.toString() + "/Lib/javaos.py";
public static void classDictInit(PyObject dict) {
// Fake from javaos import *
PyFrame frame = new PyFrame(null, dict, dict, null);
--- 9,19 ----
// An ugly hack, but it keeps the site.py from CPython2.0 happy
! public static String __file__;
public static void classDictInit(PyObject dict) {
+ String prefix = Py.getSystemState().prefix;
+ if (prefix != null)
+ __file__ = prefix + "/Lib/javaos.py";
+
// Fake from javaos import *
PyFrame frame = new PyFrame(null, dict, dict, null);
|