mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 14:32:22 -04:00
another fix for add-on downloading
This commit is contained in:
parent
6377dd161f
commit
54ea891564
1 changed files with 2 additions and 2 deletions
|
@ -1,7 +1,7 @@
|
|||
# Copyright: Damien Elmes <anki@ichi2.net>
|
||||
# -*- 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
|
||||
|
|
Loading…
Reference in a new issue