must close progress before displaying error, or user can't click it away

This commit is contained in:
Damien Elmes 2020-03-14 18:42:03 +10:00
parent e65873c0e4
commit 33f312315e

View File

@ -355,9 +355,11 @@ def importFile(mw, file):
try:
importer.open()
except UnicodeDecodeError:
mw.progress.finish()
showUnicodeWarning()
return
except Exception as e:
mw.progress.finish()
msg = repr(str(e))
if msg == "'unknownFormat'":
showWarning(_("Unknown file format."))