From 9ec91724bf1d88dc96d439640fac9065644eef55 Mon Sep 17 00:00:00 2001 From: "Soren I. Bjornstad" Date: Sat, 27 Sep 2014 10:19:43 -0500 Subject: [PATCH] catch more invalid zip file errors --- aqt/importing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aqt/importing.py b/aqt/importing.py index ae0130a50..7b2ea9278 100644 --- a/aqt/importing.py +++ b/aqt/importing.py @@ -313,8 +313,8 @@ backup, please see the 'Backups' section of the user manual.""")) else: # if it's an apkg/zip, first test it's a valid file if importer.__class__.__name__ == "AnkiPackageImporter": - z = zipfile.ZipFile(importer.file) try: + z = zipfile.ZipFile(importer.file) z.getinfo("collection.anki2") except: showWarning(invalidZipMsg())