mirror of
https://github.com/norohind/jubilant-system-core.git
synced 2026-10-22 23:02:08 +03:00
DB.py: took out db path to env variable DB_PATH
This commit is contained in:
1 file changed
+2
-1
@@ -1,7 +1,8 @@
|
||||
import sqlite3
|
||||
import os
|
||||
from SQLRequests import SQLRequests
|
||||
|
||||
db = sqlite3.connect('jubilant-system.sqlite')
|
||||
db = sqlite3.connect(os.environ['DB_PATH'])
|
||||
db.row_factory = lambda c, r: dict(zip([col[0] for col in c.description], r))
|
||||
db.executescript(SQLRequests.schema)
|
||||
|
||||
|
||||
Reference in new issue
Block a user