mirror of
https://github.com/beetbox/beets.git
synced 2026-01-30 12:02:41 +01:00
dbcore: bail out if the database does't support multi-threading
which we rely on. This test doesn't actually work for Python < 3.11, since Python used to hardcode the threadsafety value to 1
This commit is contained in:
parent
7169ac81f5
commit
89b7e1d864
1 changed files with 5 additions and 0 deletions
|
|
@ -923,6 +923,11 @@ class Database:
|
|||
"""
|
||||
|
||||
def __init__(self, path, timeout=5.0):
|
||||
if sqlite3.threadsafety == 0:
|
||||
raise RuntimeError(
|
||||
"sqlite3 must be compiled with multi-threading support"
|
||||
)
|
||||
|
||||
self.path = path
|
||||
self.timeout = timeout
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue