summaryrefslogtreecommitdiffstats
path: root/module/plugins/hooks/Checksum.py
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2014-11-09 02:43:20 +0100
committerGravatar Walter Purcaro <vuolter@gmail.com> 2014-11-09 02:43:20 +0100
commit9d9d30887a4b229b5a5b280de49ab1355998a614 (patch)
tree198c92a20ba2e55850d801ff9814981689d537cd /module/plugins/hooks/Checksum.py
parentRevert https://github.com/pyload/pyload/commit/7a09515ed34a5f5247c10d666ad8b6... (diff)
downloadpyload-9d9d30887a4b229b5a5b280de49ab1355998a614.tar.xz
[Checksum] Don't use b''
Diffstat (limited to 'module/plugins/hooks/Checksum.py')
-rw-r--r--module/plugins/hooks/Checksum.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/module/plugins/hooks/Checksum.py b/module/plugins/hooks/Checksum.py
index fe2efdb41..b746fce5f 100644
--- a/module/plugins/hooks/Checksum.py
+++ b/module/plugins/hooks/Checksum.py
@@ -18,7 +18,7 @@ def computeChecksum(local_file, algorithm):
h = getattr(hashlib, algorithm)()
with open(local_file, 'rb') as f:
- for chunk in iter(lambda: f.read(128 * h.block_size), b''):
+ for chunk in iter(lambda: f.read(128 * h.block_size), ''):
h.update(chunk)
return h.hexdigest()
@@ -28,7 +28,7 @@ def computeChecksum(local_file, algorithm):
last = 0
with open(local_file, 'rb') as f:
- for chunk in iter(lambda: f.read(8192), b''):
+ for chunk in iter(lambda: f.read(8192), ''):
last = hf(chunk, last)
return "%x" % last
@@ -40,7 +40,7 @@ def computeChecksum(local_file, algorithm):
class Checksum(Hook):
__name__ = "Checksum"
__type__ = "hook"
- __version__ = "0.13"
+ __version__ = "0.14"
__config__ = [("check_checksum", "bool", "Check checksum? (If False only size will be verified)", True),
("check_action", "fail;retry;nothing", "What to do if check fails?", "retry"),