summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2018-09-20 10:20:32 -0700
committerBerker Peksag <berker.peksag@gmail.com>2018-09-20 20:20:32 +0300
commitc56bbae5e92828a4c93be3b0e7a5072a31fdc587 (patch)
treec7700dbc76c85a53590bd14504dd27ec7265067a
parent8e5ef58c10a1154f824d5875c2d89794a800eadc (diff)
downloadcpython-git-c56bbae5e92828a4c93be3b0e7a5072a31fdc587.tar.gz
bpo-34743: Fix test_database_source_name under SQLite 3.7.9 (GH-9426)
(cherry picked from commit b10a64d117de6121ea3e79c467c4107f8f399f3d) Co-authored-by: Berker Peksag <berker.peksag@gmail.com>
-rw-r--r--Modules/_sqlite/connection.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/Modules/_sqlite/connection.c b/Modules/_sqlite/connection.c
index a5191ed27e..65f173c8c8 100644
--- a/Modules/_sqlite/connection.c
+++ b/Modules/_sqlite/connection.c
@@ -1554,6 +1554,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");