mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
bpo-35504: Fix segfaults and SystemErrors when deleting certain attrs. (GH-11175)
This commit is contained in:
parent
4db62e1158
commit
842acaab13
15 changed files with 81 additions and 4 deletions
|
@ -1161,6 +1161,10 @@ static PyObject* pysqlite_connection_get_in_transaction(pysqlite_Connection* sel
|
|||
static int
|
||||
pysqlite_connection_set_isolation_level(pysqlite_Connection* self, PyObject* isolation_level, void *Py_UNUSED(ignored))
|
||||
{
|
||||
if (isolation_level == NULL) {
|
||||
PyErr_SetString(PyExc_AttributeError, "cannot delete attribute");
|
||||
return -1;
|
||||
}
|
||||
if (isolation_level == Py_None) {
|
||||
PyObject *res = pysqlite_connection_commit(self, NULL);
|
||||
if (!res) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue