Workaround for SQLite VACUUM on Python 3.6.0

This commit is contained in:
Dan 2019-09-09 15:45:19 +02:00
parent 011375d0b2
commit 2983a3b87a

View File

@ -108,7 +108,10 @@ class FileStorage(MemoryStorage):
self.create() self.create()
with self.conn: with self.conn:
try: # Python 3.6.0 (exactly this version) is bugged and won't successfully execute the vacuum
self.conn.execute("VACUUM") self.conn.execute("VACUUM")
except sqlite3.OperationalError:
pass
def destroy(self): def destroy(self):
os.remove(self.database) os.remove(self.database)