Issue1796730

classification
Title: org.python.util.jython swallows up exit status codes
Type: Severity: normal
Components: Core Versions:
Milestone:
process
Status: closed Resolution: works for me
Dependencies: Superseder:
Assigned To: Nosy List: cgroves, nirvdrum
Priority: normal Keywords:

Created on 2007-09-17.23:22:41 by nirvdrum, last changed 2007-09-21.19:03:03 by nirvdrum.

Messages
msg1918 (view) Author: Kevin Menard (nirvdrum) Date: 2007-09-17.23:22:41
When running a script via org.python.util.jython, the script's exit status code is swallowed up.  It appears that the class only ever returns -1 or 0.  This is a problem if one relies on that status code to get a better indication of whether or not the script ran successfully, rather than whether or not Jython ran successfully.
msg1919 (view) Author: Charlie Groves (cgroves) Date: 2007-09-21.08:47:17
This works successfully for me.  The jython class itself only returns -1 or 0, but those returns are for that class.  when SystemExit is raised, it's processed by Py.maybeSystemExit which handles return codes correctly.
msg1920 (view) Author: Kevin Menard (nirvdrum) Date: 2007-09-21.19:03:03
Interesting.  There must have been a problem with my test environment.  Now that I try again, I see you are correct.
History
Date User Action Args
2007-09-17 23:22:41nirvdrumcreate