From 85d1c61f9b0cd02077bfb86d662cbd7f1460686f Mon Sep 17 00:00:00 2001 From: BarsTiger Date: Mon, 6 Nov 2023 13:22:21 +0200 Subject: [PATCH] Fix db syncing when --- bot/modules/database/pull_db.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bot/modules/database/pull_db.py b/bot/modules/database/pull_db.py index a81e238..1694a65 100644 --- a/bot/modules/database/pull_db.py +++ b/bot/modules/database/pull_db.py @@ -49,7 +49,10 @@ async def pull(): new_table = SqliteDict(DB + 'b', tablename=table) for key in new_table.keys(): if key is not None: - getattr(db, table)[key] = new_table[key] + try: + getattr(db, table)[key] = new_table[key] + except Exception as e: + assert e new_table.close() await db.write()