[Python-checkins] bpo-43434: Clean up sqlite3.connect() after GH-25818 (GH-25823)
zooba
webhook-mailer at python.org
Sun May 2 18:11:01 EDT 2021
https://github.com/python/cpython/commit/cbb7b9ed4a6069a2cb2e2f809926c2cfa332a493
commit: cbb7b9ed4a6069a2cb2e2f809926c2cfa332a493
branch: master
author: Erlend Egeberg Aasland <erlend.aasland at innova.no>
committer: zooba <steve.dower at microsoft.com>
date: 2021-05-02T23:10:51+01:00
summary:
bpo-43434: Clean up sqlite3.connect() after GH-25818 (GH-25823)
files:
M Modules/_sqlite/module.c
diff --git a/Modules/_sqlite/module.c b/Modules/_sqlite/module.c
index 324994641b4a4..a5e5525481f75 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,
More information about the Python-checkins
mailing list