From: <pj...@us...> - 2007-11-27 19:51:37
|
Revision: 3736 http://jython.svn.sourceforge.net/jython/?rev=3736&view=rev Author: pjenvey Date: 2007-11-27 11:51:28 -0800 (Tue, 27 Nov 2007) Log Message: ----------- specify ENOENT for FileNotFoundExceptions passed to Py.IOErrors Modified Paths: -------------- trunk/jython/src/org/python/core/Py.java Modified: trunk/jython/src/org/python/core/Py.java =================================================================== --- trunk/jython/src/org/python/core/Py.java 2007-11-27 16:26:58 UTC (rev 3735) +++ trunk/jython/src/org/python/core/Py.java 2007-11-27 19:51:28 UTC (rev 3736) @@ -17,6 +17,7 @@ import org.python.core.adapter.ClassicPyObjectAdapter; import org.python.core.adapter.ExtensiblePyObjectAdapter; import org.python.core.util.StringUtil; +import org.python.modules.errno; import org.python.parser.ast.modType; public final class Py @@ -143,6 +144,7 @@ String message = ioe.getMessage(); if (ioe instanceof java.io.FileNotFoundException) { message = "File not found - "+message; + return IOError(errno.ENOENT, message); } return new PyException(Py.IOError, message); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |