summaryrefslogtreecommitdiff
path: root/Python/pythonrun.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1997-10-03 13:53:28 +0000
committerGuido van Rossum <guido@python.org>1997-10-03 13:53:28 +0000
commite828942758c3551bc0d284378858e884c7157e40 (patch)
treebf7fbc048c190f5c524148f39c830ee33d57148b /Python/pythonrun.c
parentd5d8ecdb158833e6b842d3e84b11dc8b8eb16dfb (diff)
downloadcpython-e828942758c3551bc0d284378858e884c7157e40.tar.gz
Fix small omission: with all the new code, sys.exit(None) would print
"None"; this should be equivalent to sys.exit(0).
Diffstat (limited to 'Python/pythonrun.c')
-rw-r--r--Python/pythonrun.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Python/pythonrun.c b/Python/pythonrun.c
index e5dc41fa93..dfdc711a70 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