aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Python/crossinterp_exceptions.h
diff options
context:
space:
mode:
Diffstat (limited to 'Python/crossinterp_exceptions.h')
-rw-r--r--Python/crossinterp_exceptions.h7
1 files changed, 0 insertions, 7 deletions
diff --git a/Python/crossinterp_exceptions.h b/Python/crossinterp_exceptions.h
index 12cd61db1b6..98411adc5eb 100644
--- a/Python/crossinterp_exceptions.h
+++ b/Python/crossinterp_exceptions.h
@@ -7,13 +7,6 @@ _ensure_current_cause(PyThreadState *tstate, PyObject *cause)
}
PyObject *exc = _PyErr_GetRaisedException(tstate);
assert(exc != NULL);
- PyObject *ctx = PyException_GetContext(exc);
- if (ctx == NULL) {
- PyException_SetContext(exc, Py_NewRef(cause));
- }
- else {
- Py_DECREF(ctx);
- }
assert(PyException_GetCause(exc) == NULL);
PyException_SetCause(exc, Py_NewRef(cause));
_PyErr_SetRaisedException(tstate, exc);