summaryrefslogtreecommitdiffstats
path: root/Objects/exceptions.c
diff options
context:
space:
mode:
Diffstat (limited to 'Objects/exceptions.c')
-rw-r--r--Objects/exceptions.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/Objects/exceptions.c b/Objects/exceptions.c
index 1db49d9..d82340b 100644
--- a/Objects/exceptions.c
+++ b/Objects/exceptions.c
@@ -901,6 +901,11 @@ exceptiongroup_subset(
}
PyException_SetContext(eg, PyException_GetContext(orig));
PyException_SetCause(eg, PyException_GetCause(orig));
+
+ PyObject *note = _PyBaseExceptionObject_cast(orig)->note;
+ Py_XINCREF(note);
+ _PyBaseExceptionObject_cast(eg)->note = note;
+
*result = eg;
return 0;
error: