mirror of
https://github.com/python/cpython.git
synced 2025-07-10 04:45:36 +00:00
Fix small omission: with all the new code, sys.exit(None) would print
"None"; this should be equivalent to sys.exit(0).
This commit is contained in:
parent
d80b3bdc1e
commit
aa9606f45a
1 changed files with 2 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue