mirror of
https://github.com/python/cpython.git
synced 2025-10-01 21:02:15 +00:00
Fix error message in sqlite connection thread check. (GH-6028)
(cherry picked from commit 030345c0bf
)
Co-authored-by: Takuya Akiba <469803+iwiwi@users.noreply.github.com>
This commit is contained in:
parent
d01a805a38
commit
00765bb6ae
1 changed files with 2 additions and 2 deletions
|
@ -1103,8 +1103,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 %lu and this is thread id %lu",
|
||||
"SQLite objects created in a thread can only be used in that same thread. "
|
||||
"The object was created in thread id %lu and this is thread id %lu.",
|
||||
self->thread_ident, PyThread_get_thread_ident());
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue