diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2017-06-12 06:02:13 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-12 06:02:13 (GMT) |
commit | d89dc844d288ee2e403272f3e4552eed6911cafd (patch) | |
tree | 0c69c1ce14194048e402a844113068a857f45e49 /Modules | |
parent | 47c9decb5feabb51416deffd2098ee31d73f1f5f (diff) | |
download | cpython-d89dc844d288ee2e403272f3e4552eed6911cafd.zip cpython-d89dc844d288ee2e403272f3e4552eed6911cafd.tar.gz cpython-d89dc844d288ee2e403272f3e4552eed6911cafd.tar.bz2 |
[3.6] bpo-28994: Fixed errors handling in atexit._run_exitfuncs(). (GH-2034) (#2121)
The traceback no longer displayed for SystemExit raised in a callback registered by atexit..
(cherry picked from commit 3fd54d4a7e604067e2bc0f8cfd58bdbdc09fa7f4)
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/atexitmodule.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/atexitmodule.c b/Modules/atexitmodule.c index 3cdf2d7..35ebf08 100644 --- a/Modules/atexitmodule.c +++ b/Modules/atexitmodule.c @@ -97,7 +97,7 @@ atexit_callfuncs(void) Py_XDECREF(exc_tb); } PyErr_Fetch(&exc_type, &exc_value, &exc_tb); - if (!PyErr_ExceptionMatches(PyExc_SystemExit)) { + if (!PyErr_GivenExceptionMatches(exc_type, PyExc_SystemExit)) { PySys_WriteStderr("Error in atexit._run_exitfuncs:\n"); PyErr_NormalizeException(&exc_type, &exc_value, &exc_tb); PyErr_Display(exc_type, exc_value, exc_tb); |