From: Oleg Broytman Date: Sat, 24 Feb 2024 15:38:07 +0000 (+0300) Subject: Fix(DB): Close connexions X-Git-Tag: 5.1.1^0 X-Git-Url: https://git.phdru.name/?p=xsetbg.git;a=commitdiff_plain;h=d1e8443a665d4f5f23db32f5ee47d415a5424a04 Fix(DB): Close connexions --- diff --git a/ChangeLog b/ChangeLog index 842d67a..80643f1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,8 @@ Version 5.1.1 (2024-02-24) - Python 3 Fix filesystem encoding. + Python 3: Fix filesystem encoding. + + DB: Close connexions. Version 5.1.0 (2024-02-24) diff --git a/xsetbg_db.py b/xsetbg_db.py index 85cecc2..ba5ab6c 100755 --- a/xsetbg_db.py +++ b/xsetbg_db.py @@ -49,9 +49,10 @@ class SQLiteMassInsert(object): return txn def __exit__(self, *args, **kw): - sqlhub.processConnection.commit() + sqlhub.processConnection.commit(close=True) connection = sqlhub.processConnection = self.connection connection.query("VACUUM") + connection.close() db_dirs = []