summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Modules/threadmodule.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/threadmodule.c b/Modules/threadmodule.c
index 51c24d13f5..539b3470f0 100644
--- a/Modules/threadmodule.c
+++ b/Modules/threadmodule.c
@@ -215,7 +215,7 @@ t_bootstrap(boot_raw)
Py_XDECREF(boot->keyw);
PyMem_DEL(boot_raw);
if (res == NULL) {
- if (PyErr_Occurred() == PyExc_SystemExit)
+ if (PyErr_ExceptionMatches(PyExc_SystemExit))
PyErr_Clear();
else {
fprintf(stderr, "Unhandled exception in thread:\n");