Mercurial > cpython-lru_cache-weakref
comparison Python/pythonrun.c @ 6374:f6ef9af4c8b9 legacy-trunk
Fix small omission: with all the new code, sys.exit(None) would print
"None"; this should be equivalent to sys.exit(0).
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Fri, 03 Oct 1997 13:53:28 +0000 |
| parents | dfeaf965f48a |
| children | 1afcac7658e5 |
comparison
equal
deleted
inserted
replaced
| 6373:47a9a6de23ff | 6374:f6ef9af4c8b9 |
|---|---|
| 654 */ | 654 */ |
| 655 PyObject *code = PyObject_GetAttrString(v, "code"); | 655 PyObject *code = PyObject_GetAttrString(v, "code"); |
| 656 if (code) { | 656 if (code) { |
| 657 Py_DECREF(v); | 657 Py_DECREF(v); |
| 658 v = code; | 658 v = code; |
| 659 if (v == Py_None) | |
| 660 Py_Exit(0); | |
| 659 } | 661 } |
| 660 /* if we failed to dig out the "code" attribute, | 662 /* if we failed to dig out the "code" attribute, |
| 661 then just let the else clause below print the | 663 then just let the else clause below print the |
| 662 error | 664 error |
| 663 */ | 665 */ |
