From 52ac9723328de35c3302bb37a0eff2e1175ed7b0 Mon Sep 17 00:00:00 2001 From: shortcutme Date: Mon, 18 Mar 2019 03:33:06 +0100 Subject: [PATCH] Keep need commit status if commit failed --- src/Db/Db.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Db/Db.py b/src/Db/Db.py index 89dae460..6aea38ea 100644 --- a/src/Db/Db.py +++ b/src/Db/Db.py @@ -33,8 +33,9 @@ def dbCommitCheck(): if not db.need_commit: continue - db.commit("Interval") - db.need_commit = False + success = db.commit("Interval") + if success: + db.need_commit = False time.sleep(0.1) def dbCloseAll():