Skip to content

Commit 2983a3b

Browse files
committed
Workaround for SQLite VACUUM on Python 3.6.0
1 parent 011375d commit 2983a3b

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

pyrogram/client/storage/file_storage.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,10 @@ def open(self):
108108
self.create()
109109

110110
with self.conn:
111-
self.conn.execute("VACUUM")
111+
try: # Python 3.6.0 (exactly this version) is bugged and won't successfully execute the vacuum
112+
self.conn.execute("VACUUM")
113+
except sqlite3.OperationalError:
114+
pass
112115

113116
def destroy(self):
114117
os.remove(self.database)

0 commit comments

Comments
 (0)