mirror of
https://github.com/norohind/jubilant-system-core.git
synced 2025-05-30 15:19:13 +03:00
DB.py: took out db path to env variable DB_PATH
This commit is contained in:
parent
731ec5decc
commit
afdecb4cd8
3
DB.py
3
DB.py
@ -1,7 +1,8 @@
|
|||||||
import sqlite3
|
import sqlite3
|
||||||
|
import os
|
||||||
from SQLRequests import SQLRequests
|
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.row_factory = lambda c, r: dict(zip([col[0] for col in c.description], r))
|
||||||
db.executescript(SQLRequests.schema)
|
db.executescript(SQLRequests.schema)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user