bpo-45828: Use unraisable exceptions within sqlite3 callbacks (FH-29591)

This commit is contained in:
Erlend Egeberg Aasland 2021-11-29 16:22:32 +01:00 committed by GitHub
parent 6ac3c8a314
commit c4a69a4ad0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 64 additions and 34 deletions

View file

@ -691,7 +691,7 @@ print_or_clear_traceback(callback_context *ctx)
assert(ctx != NULL);
assert(ctx->state != NULL);
if (ctx->state->enable_callback_tracebacks) {
PyErr_Print();
PyErr_WriteUnraisable(ctx->callable);
}
else {
PyErr_Clear();