Skip to content
Permalink
Browse files
[dbmanager] Workaround Python error when vacuuming spatialite table
  • Loading branch information
nyalldawson committed Feb 16, 2018
1 parent d380c61 commit 838bde3
Showing 1 changed file with 5 additions and 1 deletion.
@@ -555,7 +555,11 @@ def createSpatialView(self, view, query):

def runVacuum(self):
""" run vacuum on the db """
self._execute_and_commit("VACUUM")
# Workaround http://bugs.python.org/issue28518
self.connection.isolation_level = None
c = self._get_cursor()
c.execute('VACUUM')
self.connection.isolation_level = '' # reset to default isolation

def addTableColumn(self, table, field_def):
""" add a column to table """

0 comments on commit 838bde3

Please sign in to comment.