summaryrefslogtreecommitdiffstats
path: root/module/plugins/internal/UnZip.py
diff options
context:
space:
mode:
authorGravatar jansohn <jansohn@users.noreply.github.com> 2015-10-02 10:09:26 +0200
committerGravatar jansohn <jansohn@users.noreply.github.com> 2015-10-02 10:09:26 +0200
commit3a08656c5665f4b8db98744fb323e64b8630e084 (patch)
tree28f9f62ffc57888b76ca32540dbf5af3a4cfc8d0 /module/plugins/internal/UnZip.py
parentMerge pull request #1 from pyload/stable (diff)
parent[Account] Improve parse_traffic method + code cosmetics (diff)
downloadpyload-3a08656c5665f4b8db98744fb323e64b8630e084.tar.xz
Merge pull request #2 from pyload/stable
sync with stable
Diffstat (limited to 'module/plugins/internal/UnZip.py')
-rw-r--r--module/plugins/internal/UnZip.py15
1 files changed, 5 insertions, 10 deletions
diff --git a/module/plugins/internal/UnZip.py b/module/plugins/internal/UnZip.py
index 9a01611bf..87cbd568a 100644
--- a/module/plugins/internal/UnZip.py
+++ b/module/plugins/internal/UnZip.py
@@ -7,12 +7,11 @@ import sys
import zipfile
from module.plugins.internal.Extractor import Extractor, ArchiveError, CRCError, PasswordError
-from module.utils import fs_encode
class UnZip(Extractor):
__name__ = "UnZip"
- __version__ = "1.15"
+ __version__ = "1.16"
__status__ = "testing"
__description__ = """Zip extractor plugin"""
@@ -30,17 +29,13 @@ class UnZip(Extractor):
def list(self, password=None):
- with zipfile.ZipFile(fs_encode(self.filename), 'r', allowZip64=True) as z:
+ with zipfile.ZipFile(self.target, 'r', allowZip64=True) as z:
z.setpassword(password)
return z.namelist()
- def check(self, password):
- pass
-
-
- def verify(self):
- with zipfile.ZipFile(fs_encode(self.filename), 'r', allowZip64=True) as z:
+ def verify(self, password=None):
+ with zipfile.ZipFile(self.target, 'r', allowZip64=True) as z:
badfile = z.testzip()
if badfile:
@@ -51,7 +46,7 @@ class UnZip(Extractor):
def extract(self, password=None):
try:
- with zipfile.ZipFile(fs_encode(self.filename), 'r', allowZip64=True) as z:
+ with zipfile.ZipFile(self.target, 'r', allowZip64=True) as z:
z.setpassword(password)
badfile = z.testzip()