mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
must close progress before displaying error, or user can't click it away
This commit is contained in:
parent
e65873c0e4
commit
33f312315e
1 changed files with 2 additions and 0 deletions
|
@ -355,9 +355,11 @@ def importFile(mw, file):
|
||||||
try:
|
try:
|
||||||
importer.open()
|
importer.open()
|
||||||
except UnicodeDecodeError:
|
except UnicodeDecodeError:
|
||||||
|
mw.progress.finish()
|
||||||
showUnicodeWarning()
|
showUnicodeWarning()
|
||||||
return
|
return
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
mw.progress.finish()
|
||||||
msg = repr(str(e))
|
msg = repr(str(e))
|
||||||
if msg == "'unknownFormat'":
|
if msg == "'unknownFormat'":
|
||||||
showWarning(_("Unknown file format."))
|
showWarning(_("Unknown file format."))
|
||||||
|
|
Loading…
Reference in a new issue