]> granicus.if.org Git - python/commitdiff
bpo-34743: Fix test_database_source_name under SQLite 3.7.9 (GH-9426)
authorBerker Peksag <berker.peksag@gmail.com>
Thu, 20 Sep 2018 11:14:33 +0000 (14:14 +0300)
committerGitHub <noreply@github.com>
Thu, 20 Sep 2018 11:14:33 +0000 (14:14 +0300)
Modules/_sqlite/connection.c

index 5b15d1d930a3983b1381efdd7ef78e978604cf7e..89a875189780038d2b3ddb8e465a868aca0daa32 100644 (file)
@@ -1594,6 +1594,12 @@ pysqlite_connection_backup(pysqlite_Connection *self, PyObject *args, PyObject *
             PyErr_SetString(pysqlite_OperationalError, sqlite3_errstr(rc));
 #else
             switch (rc) {
+                case SQLITE_ERROR:
+                    /* Description of SQLITE_ERROR in SQLite 3.7.14 and older
+                       releases. */
+                    PyErr_SetString(pysqlite_OperationalError,
+                                    "SQL logic error or missing database");
+                    break;
                 case SQLITE_READONLY:
                     PyErr_SetString(pysqlite_OperationalError,
                                     "attempt to write a readonly database");