From 429cb2ce7f945e9500fe906ce7a3967a81515a1e Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Sat, 1 Dec 2018 13:37:26 +1000 Subject: [PATCH] fix import screen appearing before progress dialog closes --- aqt/importing.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/aqt/importing.py b/aqt/importing.py index a207f8ec6..a16265e08 100644 --- a/aqt/importing.py +++ b/aqt/importing.py @@ -336,7 +336,10 @@ def importFile(mw, file): return mw.progress.start(immediate=True) try: - importer.run() + try: + importer.run() + finally: + mw.progress.finish() except zipfile.BadZipfile: showWarning(invalidZipMsg()) except Exception as e: @@ -360,8 +363,6 @@ Unable to import from a read-only file.""")) tooltip(log) else: showText(log) - finally: - mw.progress.finish() mw.reset() def invalidZipMsg():