summaryrefslogtreecommitdiffstats
path: root/Modules/_sqlite/connection.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/_sqlite/connection.c')
-rw-r--r--Modules/_sqlite/connection.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/Modules/_sqlite/connection.c b/Modules/_sqlite/connection.c
index 451ea24..8cf2d6a 100644
--- a/Modules/_sqlite/connection.c
+++ b/Modules/_sqlite/connection.c
@@ -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);