summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1997-10-03 13:53:28 (GMT)
committerGuido van Rossum <guido@python.org>1997-10-03 13:53:28 (GMT)
commitaa9606f45ad75439a76134b9ee1969d7c9749cf2 (patch)
treeedd5a4d3e12aa393b1283b55aefeb9d269afc109
parentd80b3bdc1e31ac5dd01cd6bcc10d20ef503902f5 (diff)
downloadcpython-aa9606f45ad75439a76134b9ee1969d7c9749cf2.zip
cpython-aa9606f45ad75439a76134b9ee1969d7c9749cf2.tar.gz
cpython-aa9606f45ad75439a76134b9ee1969d7c9749cf2.tar.bz2
Fix small omission: with all the new code, sys.exit(None) would print
"None"; this should be equivalent to sys.exit(0).
-rw-r--r--Python/pythonrun.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Python/pythonrun.c b/Python/pythonrun.c
index e5dc41f..dfdc711 100644
--- a/Python/pythonrun.c
+++ b/Python/pythonrun.c
@@ -656,6 +656,8 @@ PyErr_Print()
if (code) {
Py_DECREF(v);
v = code;
+ if (v == Py_None)
+ Py_Exit(0);
}
/* if we failed to dig out the "code" attribute,
then just let the else clause below print the