diff options
author | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-12-30 09:21:34 +0100 |
---|---|---|
committer | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-12-30 09:21:34 +0100 |
commit | ff880300c3200d0c6adfd2f8f3732a10e06d30ec (patch) | |
tree | 3b69549494e45378ffc7dd3fc410d4c50b3aa82c /module/plugins/internal | |
parent | Merge pull request #2231 from sebdelsol/patch-4 (diff) | |
download | pyload-ff880300c3200d0c6adfd2f8f3732a10e06d30ec.tar.xz |
Fix https://github.com/pyload/pyload/issues/2235
Diffstat (limited to 'module/plugins/internal')
-rw-r--r-- | module/plugins/internal/Hoster.py | 2 | ||||
-rw-r--r-- | module/plugins/internal/misc.py | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/module/plugins/internal/Hoster.py b/module/plugins/internal/Hoster.py index 1914fbfd4..4f5bf6156 100644 --- a/module/plugins/internal/Hoster.py +++ b/module/plugins/internal/Hoster.py @@ -2,6 +2,7 @@ from __future__ import with_statement +import __builtin__ import hashlib import mimetypes import os @@ -14,7 +15,6 @@ from module.plugins.internal.misc import compute_checksum, encode, exists, fixur # Python 2.5 compatibility hack for property.setter, property.deleter -import __builtin__ if not hasattr(__builtin__.property, "setter"): class property(__builtin__.property): __metaclass__ = type diff --git a/module/plugins/internal/misc.py b/module/plugins/internal/misc.py index 80c91bf24..1f4f9af1a 100644 --- a/module/plugins/internal/misc.py +++ b/module/plugins/internal/misc.py @@ -32,7 +32,7 @@ except ImportError: class misc(object): __name__ = "misc" __type__ = "plugin" - __version__ = "0.12" + __version__ = "0.13" __status__ = "stable" __pattern__ = r'^unmatchable$' @@ -803,7 +803,7 @@ def compute_checksum(filename, hashtype): last = 0 with open(file, "rb") as f: - for chunk in iter(lambda: f.read(buf), b''): + for chunk in iter(lambda: f.read(buf), ''): last = hf(chunk, last) return "%x" % last @@ -812,7 +812,7 @@ def compute_checksum(filename, hashtype): h = hashlib.new(hashtype) with open(file, "rb") as f: - for chunk in iter(lambda: f.read(buf * h.block_size), b''): + for chunk in iter(lambda: f.read(buf * h.block_size), ''): h.update(chunk) return h.hexdigest() |