diff options
author | Erlend Egeberg Aasland <erlend.aasland@innova.no> | 2021-07-14 13:26:44 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-14 04:26:44 -0700 |
commit | 05162993fe62e7fa3acebdd0062586b9bf63d46a (patch) | |
tree | 136be9cca99943560f320c11e43d3fde38a41d10 /Modules/_sqlite/microprotocols.c | |
parent | e5862f79c16e28f1ec51d179698739a9b2d8c1d2 (diff) | |
download | cpython-05162993fe62e7fa3acebdd0062586b9bf63d46a.tar.gz cpython-05162993fe62e7fa3acebdd0062586b9bf63d46a.zip |
bpo-42064: Move `sqlite3` exceptions to global state, part 2 of 2 (GH-26884)
Automerge-Triggered-By: GH:encukou
Diffstat (limited to 'Modules/_sqlite/microprotocols.c')
-rw-r--r-- | Modules/_sqlite/microprotocols.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Modules/_sqlite/microprotocols.c b/Modules/_sqlite/microprotocols.c index b2d6e7c4270..e72fc929a01 100644 --- a/Modules/_sqlite/microprotocols.c +++ b/Modules/_sqlite/microprotocols.c @@ -143,6 +143,7 @@ pysqlite_microprotocols_adapt(PyObject *obj, PyObject *proto, PyObject *alt) return Py_NewRef(alt); } /* else set the right exception and return NULL */ - PyErr_SetString(pysqlite_ProgrammingError, "can't adapt"); + pysqlite_state *state = pysqlite_get_state(NULL); + PyErr_SetString(state->ProgrammingError, "can't adapt"); return NULL; } |