mirror of
https://github.com/morpheus65535/bazarr
synced 2024-12-24 08:43:01 +00:00
Test
This commit is contained in:
parent
b061470daf
commit
f77bfbcfc0
1 changed files with 3 additions and 3 deletions
|
@ -2,15 +2,15 @@ import os
|
|||
import sqlite3
|
||||
|
||||
# Check if database exist
|
||||
if os.path.exists(os.path.join(os.path.dirname(__file__), 'data/db/bazarr.db')) == True:
|
||||
if os.path.exists(os.path.join(os.path.dirname(__file__), '/data/db/bazarr.db')) == True:
|
||||
pass
|
||||
else:
|
||||
# Get SQL script from file
|
||||
fd = open(os.path.join(os.path.dirname(__file__), 'create_db.sql'), 'r')
|
||||
fd = open(os.path.join(os.path.dirname(__file__), '/create_db.sql'), 'r')
|
||||
script = fd.read()
|
||||
|
||||
# Open database connection
|
||||
db = sqlite3.connect(os.path.join(os.path.dirname(__file__), 'data/db/bazarr.db'))
|
||||
db = sqlite3.connect(os.path.join(os.path.dirname(__file__), '/data/db/bazarr.db'))
|
||||
c = db.cursor()
|
||||
|
||||
# Execute script and commit change to database
|
||||
|
|
Loading…
Reference in a new issue