mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
catch read-only error
This commit is contained in:
parent
02b83025a7
commit
b1d3637557
1 changed files with 3 additions and 0 deletions
|
@ -299,6 +299,9 @@ def onImport(mw):
|
|||
if "invalidFile" in unicode(e):
|
||||
showWarning(_("""\
|
||||
Invalid file. Please run a DB check in Anki 1.2 and try again."""))
|
||||
elif "readonly" in unicode(e):
|
||||
showWarning(_("""\
|
||||
Unable to import from a read-only file."""))
|
||||
else:
|
||||
msg = _("Import failed.\n")
|
||||
msg += unicode(traceback.format_exc(), "ascii", "replace")
|
||||
|
|
Loading…
Reference in a new issue