diff options
author | Berker Peksag <berker.peksag@gmail.com> | 2018-09-20 11:14:33 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-20 11:14:33 (GMT) |
commit | b10a64d117de6121ea3e79c467c4107f8f399f3d (patch) | |
tree | aaedf9a28c81067b06fa77b1041e47bdc850c337 /Modules/_sqlite | |
parent | 8d1e190fc507a9e304f6817e761e9f628a23cbd8 (diff) | |
download | cpython-b10a64d117de6121ea3e79c467c4107f8f399f3d.zip cpython-b10a64d117de6121ea3e79c467c4107f8f399f3d.tar.gz cpython-b10a64d117de6121ea3e79c467c4107f8f399f3d.tar.bz2 |
bpo-34743: Fix test_database_source_name under SQLite 3.7.9 (GH-9426)
Diffstat (limited to 'Modules/_sqlite')
-rw-r--r-- | Modules/_sqlite/connection.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Modules/_sqlite/connection.c b/Modules/_sqlite/connection.c index 5b15d1d..89a8751 100644 --- a/Modules/_sqlite/connection.c +++ b/Modules/_sqlite/connection.c @@ -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"); |