Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fixup! Add tests for the fallback option
  • Loading branch information
pablogsal committed Oct 11, 2023
commit 2ab21688ce50298ff143f74d90fed63b2311d690
4 changes: 0 additions & 4 deletions Python/pythonrun.c
Original file line number Diff line number Diff line change
Expand Up @@ -685,7 +685,6 @@ struct exception_print_context
{
PyObject *file;
PyObject *seen; // Prevent cycles in recursion
bool need_close; // Need a closing bottom frame
};

static int
Expand Down Expand Up @@ -926,9 +925,7 @@ print_chained(struct exception_print_context* ctx, PyObject *value,
if (_Py_EnterRecursiveCall(" in print_chained")) {
return -1;
}
bool need_close = ctx->need_close;
int res = print_exception_recursive(ctx, value);
ctx->need_close = need_close;
_Py_LeaveRecursiveCall();
if (res < 0) {
return -1;
Expand Down Expand Up @@ -1099,7 +1096,6 @@ _PyErr_Display(PyObject *file, PyObject *unused, PyObject *value, PyObject *tb)

struct exception_print_context ctx;
ctx.file = file;
ctx.need_close = false;

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