From: <pj...@us...> - 2008-08-03 18:18:36
|
Revision: 5070 http://jython.svn.sourceforge.net/jython/?rev=5070&view=rev Author: pjenvey Date: 2008-08-03 18:18:34 +0000 (Sun, 03 Aug 2008) Log Message: ----------- o FileIO whitespace, small refactor o re-enable test_ast Modified Paths: -------------- branches/asm/Lib/test/regrtest.py branches/asm/src/org/python/core/io/FileIO.java Modified: branches/asm/Lib/test/regrtest.py =================================================================== --- branches/asm/Lib/test/regrtest.py 2008-08-03 18:14:53 UTC (rev 5069) +++ branches/asm/Lib/test/regrtest.py 2008-08-03 18:18:34 UTC (rev 5070) @@ -1467,7 +1467,6 @@ _failures = { 'java': """ - test_ast test_codecencodings_cn test_codecencodings_hk test_codecencodings_jp Modified: branches/asm/src/org/python/core/io/FileIO.java =================================================================== --- branches/asm/src/org/python/core/io/FileIO.java 2008-08-03 18:14:53 UTC (rev 5069) +++ branches/asm/src/org/python/core/io/FileIO.java 2008-08-03 18:18:34 UTC (rev 5070) @@ -69,8 +69,8 @@ if (fullPath.isDirectory()) { throw Py.IOError(errno.EISDIR, "Is a directory"); } - if ( (writable && !fullPath.canWrite()) || - fnfe.getMessage().endsWith("(Permission denied)")) { + if ((writable && !fullPath.canWrite()) + || fnfe.getMessage().endsWith("(Permission denied)")) { throw Py.IOError(errno.EACCES, "Permission denied: '" + name + "'"); } throw Py.IOError(errno.ENOENT, "No such file or directory: '" + name + "'"); @@ -178,10 +178,11 @@ /** {@inheritDoc} */ public boolean isatty() { checkClosed(); - if (file == null) return false; - + if (file == null) { + return false; + } try { - return imp.load("os").__getattr__("isatty").__call__(Py.java2py(file.getFD())).__nonzero__(); + return imp.load("os").invoke("isatty", Py.java2py(file.getFD())).__nonzero__(); } catch (IOException e) { return false; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |