fix error handling for selecting invalid file type
(The error was never appearing because the test was missing quotation marks.)
This commit is contained in:
parent
e0777602db
commit
6771af40b1
@ -295,7 +295,7 @@ def importFile(mw, file):
|
||||
return
|
||||
except Exception, e:
|
||||
msg = repr(str(e))
|
||||
if msg == "unknownFormat":
|
||||
if msg == "'unknownFormat'":
|
||||
if file.endswith(".anki2"):
|
||||
showWarning(_("""\
|
||||
.anki2 files are not designed for importing. If you're trying to restore from a \
|
||||
|
Loading…
Reference in New Issue
Block a user