[Python-checkins] bpo-34743: Fix test_database_source_name under SQLite 3.7.9 (GH-9426)

Berker Peksag webhook-mailer at python.org
Thu Sep 20 07:14:38 EDT 2018


https://github.com/python/cpython/commit/b10a64d117de6121ea3e79c467c4107f8f399f3d
commit: b10a64d117de6121ea3e79c467c4107f8f399f3d
branch: master
author: Berker Peksag <berker.peksag at gmail.com>
committer: GitHub <noreply at github.com>
date: 2018年09月20日T14:14:33+03:00
summary:
bpo-34743: Fix test_database_source_name under SQLite 3.7.9 (GH-9426)
files:
M Modules/_sqlite/connection.c
diff --git a/Modules/_sqlite/connection.c b/Modules/_sqlite/connection.c
index 5b15d1d930a3..89a875189780 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");


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /