We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 891ebce commit 393368fCopy full SHA for 393368f
Modules/_sqlite/cursor.c
@@ -407,7 +407,6 @@ begin_transaction(pysqlite_Connection *self)
407
Py_END_ALLOW_THREADS
408
409
if (rc != SQLITE_OK) {
410
- _pysqlite_seterror(self->db);
411
goto error;
412
}
413
@@ -416,15 +415,15 @@ begin_transaction(pysqlite_Connection *self)
416
415
rc = sqlite3_finalize(statement);
417
418
419
- if (rc != SQLITE_OK && !PyErr_Occurred()) {
420
+ if (rc != SQLITE_OK) {
+ goto error;
421
422
423
-error:
424
- if (PyErr_Occurred()) {
425
- return -1;
426
- }
427
return 0;
+
+error:
+ _pysqlite_seterror(self->db);
+ return -1;
428
429
430
static PyObject *
0 commit comments