From: <fwi...@us...> - 2008-08-17 00:02:48
|
Revision: 5191 http://jython.svn.sourceforge.net/jython/?rev=5191&view=rev Author: fwierzbicki Date: 2008-08-17 00:02:42 +0000 (Sun, 17 Aug 2008) Log Message: ----------- check for Py.None in runCode as well as null for locals and globals. Fixes test_decorators.py Modified Paths: -------------- branches/asm/src/org/python/core/Py.java Modified: branches/asm/src/org/python/core/Py.java =================================================================== --- branches/asm/src/org/python/core/Py.java 2008-08-16 22:46:04 UTC (rev 5190) +++ branches/asm/src/org/python/core/Py.java 2008-08-17 00:02:42 UTC (rev 5191) @@ -1178,15 +1178,15 @@ public static PyObject runCode(PyCode code, PyObject locals, PyObject globals) { PyFrame f; - if (locals == null) { - if (globals != null) { + if (locals == null || locals == Py.None) { + if (globals != null && globals != Py.None) { locals = globals; } else { locals = Py.getFrame().getLocals(); } } - if (globals == null) { + if (globals == null || globals == Py.None) { globals = Py.getFrame().f_globals; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |