[Python-checkins] [2.7] Fix error message in sqlite connection thread check. (GH-6028). (GH-6325)

Serhiy Storchaka webhook-mailer at python.org
Sat Mar 31 18:04:25 EDT 2018


https://github.com/python/cpython/commit/924035a5e550c9d0bee05c26eadff0e44a0db582
commit: 924035a5e550c9d0bee05c26eadff0e44a0db582
branch: 2.7
author: Serhiy Storchaka <storchaka at gmail.com>
committer: GitHub <noreply at github.com>
date: 2018-04-01T01:04:22+03:00
summary:

[2.7] Fix error message in sqlite connection thread check. (GH-6028). (GH-6325)

(cherry picked from commit 030345c0bfc2f76684666fe5c61e766ba5debfe6)

Co-authored-by: Takuya Akiba <469803+iwiwi at users.noreply.github.com>

files:
M Modules/_sqlite/connection.c

diff --git a/Modules/_sqlite/connection.c b/Modules/_sqlite/connection.c
index 439542e51393..0603b4307b17 100644
--- a/Modules/_sqlite/connection.c
+++ b/Modules/_sqlite/connection.c
@@ -1106,8 +1106,8 @@ int pysqlite_check_thread(pysqlite_Connection* self)
     if (self->check_same_thread) {
         if (PyThread_get_thread_ident() != self->thread_ident) {
             PyErr_Format(pysqlite_ProgrammingError,
-                        "SQLite objects created in a thread can only be used in that same thread."
-                        "The object was created in thread id %ld and this is thread id %ld",
+                        "SQLite objects created in a thread can only be used in that same thread. "
+                        "The object was created in thread id %ld and this is thread id %ld.",
                         self->thread_ident, PyThread_get_thread_ident());
             return 0;
         }



More information about the Python-checkins mailing list