Skip to content

Commit 2ab2168

Browse files
committed
fixup! Add tests for the fallback option
1 parent 2292ab3 commit 2ab2168

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

Python/pythonrun.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -685,7 +685,6 @@ struct exception_print_context
685685
{
686686
PyObject *file;
687687
PyObject *seen; // Prevent cycles in recursion
688-
bool need_close; // Need a closing bottom frame
689688
};
690689

691690
static int
@@ -926,9 +925,7 @@ print_chained(struct exception_print_context* ctx, PyObject *value,
926925
if (_Py_EnterRecursiveCall(" in print_chained")) {
927926
return -1;
928927
}
929-
bool need_close = ctx->need_close;
930928
int res = print_exception_recursive(ctx, value);
931-
ctx->need_close = need_close;
932929
_Py_LeaveRecursiveCall();
933930
if (res < 0) {
934931
return -1;
@@ -1099,7 +1096,6 @@ _PyErr_Display(PyObject *file, PyObject *unused, PyObject *value, PyObject *tb)
10991096

11001097
struct exception_print_context ctx;
11011098
ctx.file = file;
1102-
ctx.need_close = false;
11031099

11041100
/* We choose to ignore seen being possibly NULL, and report
11051101
at least the main exception (it could be a MemoryError).

0 commit comments

Comments
 (0)