Commit 0f253340 authored by Pierre-Antoine Rouby's avatar Pierre-Antoine Rouby
Browse files

pamhyr: Close study DB if already init.

No related merge requests found
Pipeline #54357 passed with stages
in 3 minutes and 20 seconds
Showing with 3 additions and 1 deletion
+3 -1
......@@ -35,8 +35,10 @@ class SQLModel(SQL):
_sub_classes = []
def _init_db_file(self, db, is_new=True):
exists = Path(db).exists()
if self._db is not None:
self._db.close()
exists = Path(db).exists()
if exists and is_new:
os.remove(db)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment