From 54ea8915645c66bb864de645039d290584bb554c Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Tue, 2 Aug 2016 11:51:44 +1000 Subject: [PATCH] another fix for add-on downloading --- aqt/addons.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aqt/addons.py b/aqt/addons.py index 03ee880c2..d3225176c 100644 --- a/aqt/addons.py +++ b/aqt/addons.py @@ -1,7 +1,7 @@ # Copyright: Damien Elmes # -*- coding: utf-8 -*- # License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html - +import io import sys, os, traceback from io import StringIO import zipfile @@ -133,7 +133,7 @@ download add-ons that say they support Anki 2.1.x in the description.""") return # .zip file try: - z = ZipFile(StringIO(data)) + z = ZipFile(io.BytesIO(data)) except zipfile.BadZipfile: showWarning(_("The download was corrupt. Please try again.")) return