File tree 1 file changed +5
-12
lines changed
1 file changed +5
-12
lines changed Original file line number Diff line number Diff line change @@ -250,17 +250,14 @@ connection_clear(pysqlite_Connection *self)
250
250
return 0 ;
251
251
}
252
252
253
- static int
253
+ static void
254
254
connection_close (pysqlite_Connection * self )
255
255
{
256
- int rc = SQLITE_OK ;
257
-
258
256
if (self -> db ) {
259
- rc = sqlite3_close_v2 (self -> db );
257
+ int rc = sqlite3_close_v2 (self -> db );
258
+ assert (rc == SQLITE_OK );
260
259
self -> db = NULL ;
261
260
}
262
-
263
- return rc ;
264
261
}
265
262
266
263
static void
@@ -271,7 +268,7 @@ connection_dealloc(pysqlite_Connection *self)
271
268
tp -> tp_clear ((PyObject * )self );
272
269
273
270
/* Clean up if user has not called .close() explicitly. */
274
- ( void ) connection_close (self );
271
+ connection_close (self );
275
272
276
273
tp -> tp_free (self );
277
274
Py_DECREF (tp );
@@ -367,11 +364,7 @@ pysqlite_connection_close_impl(pysqlite_Connection *self)
367
364
Py_CLEAR (self -> statements );
368
365
Py_CLEAR (self -> cursors );
369
366
370
- int rc = connection_close (self );
371
- if (rc != SQLITE_OK ) {
372
- _pysqlite_seterror (self -> db );
373
- return NULL ;
374
- }
367
+ connection_close (self );
375
368
}
376
369
377
370
Py_RETURN_NONE ;
You can’t perform that action at this time.
0 commit comments