-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
2 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
# Copyright: Damien Elmes <[email protected]> | ||
# -*- 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 @@ def install(self, data, fname): | |
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 | ||
|