bpo-34743: Fix test_database_source_name under SQLite 3.7.9 (GH-9426)

(cherry picked from commit b10a64d117)

Co-authored-by: Berker Peksag <berker.peksag@gmail.com>
This commit is contained in:
Miss Islington (bot) 2018-09-20 10:20:32 -07:00 committed by Berker Peksag
parent 8e5ef58c10
commit c56bbae5e9
1 changed files with 6 additions and 0 deletions

View File

@ -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");