Workaround for SQLite VACUUM on Python 3.6.0
This commit is contained in:
parent
011375d0b2
commit
2983a3b87a
@ -108,7 +108,10 @@ class FileStorage(MemoryStorage):
|
|||||||
self.create()
|
self.create()
|
||||||
|
|
||||||
with self.conn:
|
with self.conn:
|
||||||
self.conn.execute("VACUUM")
|
try: # Python 3.6.0 (exactly this version) is bugged and won't successfully execute the vacuum
|
||||||
|
self.conn.execute("VACUUM")
|
||||||
|
except sqlite3.OperationalError:
|
||||||
|
pass
|
||||||
|
|
||||||
def destroy(self):
|
def destroy(self):
|
||||||
os.remove(self.database)
|
os.remove(self.database)
|
||||||
|
Loading…
Reference in New Issue
Block a user