3
0
Fork 0
mirror of https://github.com/YosysHQ/sby.git synced 2025-08-11 07:40:54 +00:00

Use a cursor for PRAGMAs

This commit is contained in:
Krystine Sherwin 2025-07-08 15:44:01 +12:00
parent 236f0ec59c
commit 03244c4f96
No known key found for this signature in database

View file

@ -68,8 +68,10 @@ class SbyStatusDb:
self.db = sqlite3.connect(path, isolation_level=None, timeout=timeout) self.db = sqlite3.connect(path, isolation_level=None, timeout=timeout)
self.db.row_factory = sqlite3.Row self.db.row_factory = sqlite3.Row
self.db.execute("PRAGMA journal_mode=WAL") cur = self.db.cursor()
self.db.execute("PRAGMA synchronous=0") cur.execute("PRAGMA journal_mode=WAL")
cur.execute("PRAGMA synchronous=0")
self.db.commit()
if setup: if setup:
self._setup() self._setup()