summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorErlend Egeberg Aasland <erlend.aasland@innova.no>2021-05-02 22:10:51 (GMT)
committerGitHub <noreply@github.com>2021-05-02 22:10:51 (GMT)
commitcbb7b9ed4a6069a2cb2e2f809926c2cfa332a493 (patch)
treede9a54ba007e5700a31a4e87910b9cd2f6d86a06 /Modules
parent5fb06edbbb769561e245d0fe13002bab50e2ae60 (diff)
downloadcpython-cbb7b9ed4a6069a2cb2e2f809926c2cfa332a493.zip
cpython-cbb7b9ed4a6069a2cb2e2f809926c2cfa332a493.tar.gz
cpython-cbb7b9ed4a6069a2cb2e2f809926c2cfa332a493.tar.bz2
bpo-43434: Clean up sqlite3.connect() after GH-25818 (GH-25823)
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_sqlite/module.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/Modules/_sqlite/module.c b/Modules/_sqlite/module.c
index 3249946..a5e5525 100644
--- a/Modules/_sqlite/module.c
+++ b/Modules/_sqlite/module.c
@@ -77,8 +77,6 @@ static PyObject* module_connect(PyObject* self, PyObject* args, PyObject*
int uri = 0;
double timeout = 5.0;
- PyObject* result;
-
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|diOiOip", kwlist,
&database, &timeout, &detect_types,
&isolation_level, &check_same_thread,
@@ -91,12 +89,7 @@ static PyObject* module_connect(PyObject* self, PyObject* args, PyObject*
factory = (PyObject*)pysqlite_ConnectionType;
}
- result = PyObject_Call(factory, args, kwargs);
- if (result == NULL) {
- return NULL;
- }
-
- return result;
+ return PyObject_Call(factory, args, kwargs);
}
PyDoc_STRVAR(module_connect_doc,