diff options
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/_sqlite/cursor.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Modules/_sqlite/cursor.c b/Modules/_sqlite/cursor.c index ddacb27..23ab745 100644 --- a/Modules/_sqlite/cursor.c +++ b/Modules/_sqlite/cursor.c @@ -715,14 +715,13 @@ pysqlite_cursor_executescript(pysqlite_Cursor *self, PyObject *script_obj) } /* execute statement, and ignore results of SELECT statements */ - rc = SQLITE_ROW; - while (rc == SQLITE_ROW) { + do { rc = pysqlite_step(statement, self->connection); if (PyErr_Occurred()) { (void)sqlite3_finalize(statement); goto error; } - } + } while (rc == SQLITE_ROW); if (rc != SQLITE_DONE) { (void)sqlite3_finalize(statement); |