From 13f3719650413877ce2248a80cae2ba7125a9772 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Fri, 20 Mar 2020 18:33:35 +1000 Subject: [PATCH] ensure endReset() is called even if an exception is raised --- qt/aqt/browser.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/qt/aqt/browser.py b/qt/aqt/browser.py index f7b5f7804..11ac3e25e 100644 --- a/qt/aqt/browser.py +++ b/qt/aqt/browser.py @@ -184,8 +184,9 @@ class DataModel(QAbstractTableModel): invalid = True else: raise - # print "fetch cards in %dms" % ((time.time() - t)*1000) - self.endReset() + finally: + # print "fetch cards in %dms" % ((time.time() - t)*1000) + self.endReset() if invalid: showWarning(_("Invalid search - please check for typing mistakes."))