From: <pj...@us...> - 2010-03-21 17:52:42
|
Revision: 6987 http://jython.svn.sourceforge.net/jython/?rev=6987&view=rev Author: pjenvey Date: 2010-03-21 17:52:36 +0000 (Sun, 21 Mar 2010) Log Message: ----------- fix os.system not returning the command's exit code fixes #1577 and the test_chdir os.sytem tests patch from Alex Gr?\195?\182nholm Modified Paths: -------------- trunk/jython/src/org/python/modules/posix/PosixModule.java Modified: trunk/jython/src/org/python/modules/posix/PosixModule.java =================================================================== --- trunk/jython/src/org/python/modules/posix/PosixModule.java 2010-03-15 01:37:30 UTC (rev 6986) +++ trunk/jython/src/org/python/modules/posix/PosixModule.java 2010-03-21 17:52:36 UTC (rev 6987) @@ -710,10 +710,10 @@ public static PyString __doc__system = new PyString( "system(command) -> exit_status\n\n" + "Execute the command (a string) in a subshell."); - public static void system(PyObject command) { - // import subprocess; subprocess.call(command, shell=True) - imp.load("subprocess").invoke("call", command, new PyObject[] {Py.True}, - new String[] {"shell"}); + public static PyObject system(PyObject command) { + // import subprocess; return subprocess.call(command, shell=True) + return imp.load("subprocess").invoke("call", command, new PyObject[] {Py.True}, + new String[] {"shell"}); } public static PyString __doc__umask = new PyString( This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |