Commit eb79c7e6 authored by Jérome Perrin's avatar Jérome Perrin

collect: VACUUM after transaction

On python3.6 this raises:

 sqlite3.OperationalError: cannot VACUUM from within a transaction
parent d62d5776
...@@ -300,9 +300,9 @@ class Database: ...@@ -300,9 +300,9 @@ class Database:
self._execute(delete_sql % (table, where_clause)) self._execute(delete_sql % (table, where_clause))
vacuum = 1 vacuum = 1
if vacuum:
self._execute("VACUUM;")
self.commit() self.commit()
if vacuum:
self._execute("VACUUM")
self.close() self.close()
def getDateScopeList(self, ignore_date=None, reported=0): def getDateScopeList(self, ignore_date=None, reported=0):
......
Markdown is supported
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