Applied auto pep 8 changes
This commit is contained in:
@ -14,14 +14,14 @@ def create_connection(path: str, filename: str):
|
||||
|
||||
print("Database file open")
|
||||
# Execute creation scripts
|
||||
sql = open("scripts/create_tables.sql", "r");
|
||||
sql = open("scripts/create_tables.sql", "r")
|
||||
conn.executescript(sql.read())
|
||||
|
||||
print("Table creation complete")
|
||||
|
||||
# Populate with test data if we are in Test Mode
|
||||
if os.environ.get("ENVIRON") == "test":
|
||||
sql = open("scripts/test_data.sql", "r");
|
||||
sql = open("scripts/test_data.sql", "r")
|
||||
conn.executescript(sql.read())
|
||||
|
||||
except sqlite3.Error as e:
|
||||
@ -31,12 +31,15 @@ def create_connection(path: str, filename: str):
|
||||
conn.close()
|
||||
|
||||
# Ensure a directory is created given a path to it
|
||||
|
||||
|
||||
def create_directory(dir: str):
|
||||
try:
|
||||
os.makedirs(dir)
|
||||
except FileExistsError:
|
||||
pass
|
||||
|
||||
|
||||
def remove_file(dir: str):
|
||||
try:
|
||||
os.remove(dir)
|
||||
@ -44,7 +47,6 @@ def remove_file(dir: str):
|
||||
pass
|
||||
|
||||
|
||||
|
||||
dir = r"./data/"
|
||||
db_name = r"wmgzon.db"
|
||||
|
||||
|
Reference in New Issue
Block a user