mirror of
https://github.com/ankitects/anki.git
synced 2025-09-21 23:42:23 -04:00
better warning when apkg invalid
This commit is contained in:
parent
0afce5f19a
commit
400571306a
1 changed files with 7 additions and 0 deletions
|
@ -306,6 +306,13 @@ backup, please see the 'Backups' section of the user manual."""))
|
||||||
mw.progress.start(immediate=True)
|
mw.progress.start(immediate=True)
|
||||||
try:
|
try:
|
||||||
importer.run()
|
importer.run()
|
||||||
|
except zipfile.BadZipfile:
|
||||||
|
msg = _("""\
|
||||||
|
This file does not appear to be a valid .apkg file. If you're getting this \
|
||||||
|
error from a file downloaded from AnkiWeb, chances are that your download \
|
||||||
|
failed. Please try again, and if the problem persists, please try again \
|
||||||
|
with a different browser.""")
|
||||||
|
showWarning(msg)
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
if "invalidFile" in unicode(e):
|
if "invalidFile" in unicode(e):
|
||||||
msg = _("""\
|
msg = _("""\
|
||||||
|
|
Loading…
Reference in a new issue