From d1e8443a665d4f5f23db32f5ee47d415a5424a04 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Sat, 24 Feb 2024 18:38:07 +0300 Subject: [PATCH] Fix(DB): Close connexions --- ChangeLog | 4 +++- xsetbg_db.py | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) 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 = [] -- 2.39.5