mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Issue #20026: Fix the sqlite module to handle correctly invalid isolation level
(wrong type).
This commit is contained in:
parent
cac23a50ee
commit
cb1f74ec40
3 changed files with 12 additions and 1 deletions
|
@ -109,7 +109,10 @@ int pysqlite_connection_init(pysqlite_Connection* self, PyObject* args, PyObject
|
|||
Py_INCREF(isolation_level);
|
||||
}
|
||||
self->isolation_level = NULL;
|
||||
pysqlite_connection_set_isolation_level(self, isolation_level);
|
||||
if (pysqlite_connection_set_isolation_level(self, isolation_level) < 0) {
|
||||
Py_DECREF(isolation_level);
|
||||
return -1;
|
||||
}
|
||||
Py_DECREF(isolation_level);
|
||||
|
||||
self->statement_cache = (pysqlite_Cache*)PyObject_CallFunction((PyObject*)&pysqlite_CacheType, "Oi", self, cached_statements);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue