Title: exit code of 0 on unhandled exception
Type: behaviour Severity: normal
Components: Versions: 2.5.2rc
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: draghuram, michael.foord, pjenvey, zyasoft
Priority: Keywords:

Created on 2010-12-07.00:29:59 by michael.foord, last changed 2010-12-24.23:23:26 by pjenvey.

msg6268 (view) Author: Michael Foord (michael.foord) Date: 2010-12-07.00:29:59
Version 2.5.2rc (not listed in versions)

My OS is Mac OS X 10.6.5 

If a script exits due to an unhandled exception the exit code is 0. This breaks tools like tox that use the exit code to determine success / failure.
msg6269 (view) Author: Philip Jenvey (pjenvey) Date: 2010-12-07.01:04:21
Hey Jim, this is a regression from 2.5.1, looks like it's due to r7161. The fix will probably be something along the lines of this (this needs testing)

Index: src/org/python/util/
--- src/org/python/util/	(revision 7172)
+++ src/org/python/util/	(working copy)
@@ -263,10 +263,8 @@
                     } else {
-                        if (!opts.interactive) {
-                            interp.cleanup();
-                            System.exit(-1);
-                        }
+                        interp.cleanup();
+                        System.exit(-1);

msg6271 (view) Author: Raghuram Devarakonda (draghuram) Date: 2010-12-07.15:05:40
Added 2.5.2rc to versions.
msg6303 (view) Author: Philip Jenvey (pjenvey) Date: 2010-12-24.23:23:26
fixed in r7178
Date User Action Args
2010-12-24 23:23:26pjenveysetstatus: open -> closed
resolution: fixed
messages: + msg6303
2010-12-07 15:05:40draghuramsetnosy: + draghuram
messages: + msg6271
versions: + 2.5.2rc
2010-12-07 01:04:22pjenveysetnosy: + pjenvey, zyasoft
messages: + msg6269
2010-12-07 00:29:59michael.foordcreate