bpo-42064: Move sqlite3 exceptions to global state, part 2 of 2 (GH-26884)
Automerge-Triggered-By: GH:encukou
This commit is contained in:
committed by
GitHub
parent
e5862f79c1
commit
05162993fe
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user