fix import screen appearing before progress dialog closes

This commit is contained in:
Damien Elmes 2018-12-01 13:37:26 +10:00
parent f2bb7eb5ae
commit 429cb2ce7f

View File

@ -336,7 +336,10 @@ def importFile(mw, file):
return return
mw.progress.start(immediate=True) mw.progress.start(immediate=True)
try: try:
importer.run() try:
importer.run()
finally:
mw.progress.finish()
except zipfile.BadZipfile: except zipfile.BadZipfile:
showWarning(invalidZipMsg()) showWarning(invalidZipMsg())
except Exception as e: except Exception as e:
@ -360,8 +363,6 @@ Unable to import from a read-only file."""))
tooltip(log) tooltip(log)
else: else:
showText(log) showText(log)
finally:
mw.progress.finish()
mw.reset() mw.reset()
def invalidZipMsg(): def invalidZipMsg():