File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -1088,8 +1088,11 @@ BaseExceptionGroup_repr(PyObject *op)
10881088
10891089 PyObject * exceptions_str = NULL ;
10901090
1091- /* If the initial exceptions string was not saved in the constructor. */
1092- if (!self -> excs_str ) {
1091+ /* Use the saved exceptions string for custom sequences. */
1092+ if (self -> excs_str ) {
1093+ exceptions_str = Py_NewRef (self -> excs_str );
1094+ }
1095+ else {
10931096 assert (self -> excs );
10941097
10951098 /* Older versions delegated to BaseException, inserting the current
@@ -1113,9 +1116,6 @@ BaseExceptionGroup_repr(PyObject *op)
11131116 return NULL ;
11141117 }
11151118 }
1116- else {
1117- exceptions_str = Py_NewRef (self -> excs_str );
1118- }
11191119
11201120 assert (exceptions_str != NULL );
11211121
You can’t perform that action at this time.
0 commit comments