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 838bde33ab08bcdd9b41d5b8d6f48c9a7a2aa24d
Showing with 5 additions and 1 deletion.
  1. +5 −1 python/plugins/db_manager/db_plugins/spatialite/connector.py
@@ -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.
You can’t perform that action at this time.