Skip to content

Commit 7d8014a

Browse files
author
Erlend E. Aasland
committed
Check connection on __enter__
1 parent 4ebb593 commit 7d8014a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Modules/_sqlite/connection.c

+3
Original file line numberDiff line numberDiff line change
@@ -1815,6 +1815,9 @@ static PyObject *
18151815
pysqlite_connection_enter_impl(pysqlite_Connection *self)
18161816
/*[clinic end generated code: output=457b09726d3e9dcd input=127d7a4f17e86d8f]*/
18171817
{
1818+
if (!pysqlite_check_connection(self)) {
1819+
return NULL;
1820+
}
18181821
return Py_NewRef((PyObject *)self);
18191822
}
18201823

0 commit comments

Comments
 (0)