diff options
author | Louie S <louie@example.com> | 2023-09-16 09:36:14 -0400 |
---|---|---|
committer | Louie S <louie@example.com> | 2023-09-16 09:36:14 -0400 |
commit | 6e52afa26d8c50d07988376e43a641c70370b9c5 (patch) | |
tree | 3b9cc7f01aa8a64fa4dea6ee4547fc50423f6725 /db_sqlite.py | |
parent | 76a1b6384301a9a8e37b1176f83f55b2827b2d16 (diff) |
Create preferences dialog to control config file
Diffstat (limited to 'db_sqlite.py')
-rw-r--r-- | db_sqlite.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/db_sqlite.py b/db_sqlite.py index 189ac57..af7f185 100644 --- a/db_sqlite.py +++ b/db_sqlite.py @@ -11,7 +11,7 @@ def initDB(): """ Check for existing database. If it doesn't exist, build it """ - if not os.path.exists(Globals.db_path): + if not os.path.exists(Globals.db_path) or not os.stat(Globals.db_path).st_size: createTables() loadFromTables() @@ -20,6 +20,7 @@ def createTables(): """ Create database at a specified Globals.db_path """ + print(Globals.db_path) database = QSqlDatabase.addDatabase("QSQLITE") # SQlite version 3 database.setDatabaseName(Globals.db_path) |