diff options
| author | Victor Stinner <victor.stinner@gmail.com> | 2013-12-19 15:39:00 (GMT) |
|---|---|---|
| committer | Victor Stinner <victor.stinner@gmail.com> | 2013-12-19 15:39:00 (GMT) |
| commit | 08263f10f8b9374cccf47591c3ccc64fb888d269 (patch) | |
| tree | 282f80787b548ed341b77dfe1fb4c536dfe036fb /Modules/_sqlite/connection.c | |
| parent | cf58fb5e2947ebe6ac1e06b7f8fbe9a417b7430f (diff) | |
| parent | cb1f74ec405b81dd1319b616829dd576a48603f8 (diff) | |
| download | cpython-08263f10f8b9374cccf47591c3ccc64fb888d269.zip cpython-08263f10f8b9374cccf47591c3ccc64fb888d269.tar.gz cpython-08263f10f8b9374cccf47591c3ccc64fb888d269.tar.bz2 | |
(Merge 3.3) Issue #20026: Fix the sqlite module to handle correctly invalid
isolation level (wrong type).
Diffstat (limited to 'Modules/_sqlite/connection.c')
| -rw-r--r-- | Modules/_sqlite/connection.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Modules/_sqlite/connection.c b/Modules/_sqlite/connection.c index 50c6f0a..882424b 100644 --- a/Modules/_sqlite/connection.c +++ b/Modules/_sqlite/connection.c @@ -128,7 +128,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); |
