X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=xsetbg_db.py;h=ba5ab6c7630cccbdd55cd717000d8ab111f207a4;hb=refs%2Fheads%2Fmaster;hp=0ad9d048625dce5f00eea0ab0b2f67d56f5cc6b3;hpb=3c346158f50cfb7e7995cc0176af52d88308529f;p=xsetbg.git diff --git a/xsetbg_db.py b/xsetbg_db.py index 0ad9d04..ba5ab6c 100755 --- a/xsetbg_db.py +++ b/xsetbg_db.py @@ -1,4 +1,4 @@ -#! /usr/bin/env python +#! /usr/bin/env python3 """XSetBg database """ @@ -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 = []