Skip to content

Commit cbb7b9e

Browse files
author
Erlend Egeberg Aasland
authored
bpo-43434: Clean up sqlite3.connect() after GH-25818 (GH-25823)
1 parent 5fb06ed commit cbb7b9e

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

Modules/_sqlite/module.c

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,6 @@ static PyObject* module_connect(PyObject* self, PyObject* args, PyObject*
7777
int uri = 0;
7878
double timeout = 5.0;
7979

80-
PyObject* result;
81-
8280
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|diOiOip", kwlist,
8381
&database, &timeout, &detect_types,
8482
&isolation_level, &check_same_thread,
@@ -91,12 +89,7 @@ static PyObject* module_connect(PyObject* self, PyObject* args, PyObject*
9189
factory = (PyObject*)pysqlite_ConnectionType;
9290
}
9391

94-
result = PyObject_Call(factory, args, kwargs);
95-
if (result == NULL) {
96-
return NULL;
97-
}
98-
99-
return result;
92+
return PyObject_Call(factory, args, kwargs);
10093
}
10194

10295
PyDoc_STRVAR(module_connect_doc,

0 commit comments

Comments
 (0)