From 6771af40b1d3d72d5a2b1ea3cc54f56ba93439eb Mon Sep 17 00:00:00 2001 From: "Soren I. Bjornstad" Date: Tue, 17 Jun 2014 08:31:38 -0500 Subject: [PATCH] fix error handling for selecting invalid file type (The error was never appearing because the test was missing quotation marks.) --- aqt/importing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aqt/importing.py b/aqt/importing.py index ef99958c8..fce17ccff 100644 --- a/aqt/importing.py +++ b/aqt/importing.py @@ -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 \