mirror of
https://github.com/minetest/contentdb.git
synced 2024-11-09 17:13:45 +01:00
setup.py: Remove unused and broken -d arg
This commit is contained in:
parent
cc6f561cfe
commit
c7b215fcca
@ -20,11 +20,9 @@ import os
|
|||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if not "FLASK_CONFIG" in os.environ:
|
if not "FLASK_CONFIG" in os.environ:
|
||||||
os.environ["FLASK_CONFIG"] = "../config.cfg"
|
os.environ["FLASK_CONFIG"] = "../config.cfg"
|
||||||
|
|
||||||
delete_db = len(sys.argv) >= 2 and sys.argv[1].strip() == "-d"
|
|
||||||
create_db = not (len(sys.argv) >= 2 and sys.argv[1].strip() == "-o")
|
create_db = not (len(sys.argv) >= 2 and sys.argv[1].strip() == "-o")
|
||||||
test_data = len(sys.argv) >= 2 and sys.argv[1].strip() == "-t" or not create_db
|
test_data = len(sys.argv) >= 2 and sys.argv[1].strip() == "-t" or not create_db
|
||||||
|
|
||||||
@ -36,9 +34,6 @@ sys.path.insert(0,parentdir)
|
|||||||
from app.models import db
|
from app.models import db
|
||||||
from app.default_data import populate, populate_test_data
|
from app.default_data import populate, populate_test_data
|
||||||
|
|
||||||
if delete_db and os.path.isfile("db.sqlite"):
|
|
||||||
os.remove("db.sqlite")
|
|
||||||
|
|
||||||
from app import app
|
from app import app
|
||||||
with app.app_context():
|
with app.app_context():
|
||||||
if create_db:
|
if create_db:
|
||||||
|
Loading…
Reference in New Issue
Block a user