summaryrefslogtreecommitdiffstats
path: root/module/plugins/hooks/Checksum.py
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-09-02 21:12:55 +0200
committerGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-09-02 21:12:55 +0200
commitadd6a442b9b876d55653f070f253e074638f04d2 (patch)
treee5e21612cf2b95f5744b7cecdb28a7ef103543f0 /module/plugins/hooks/Checksum.py
parentMerge pull request #1798 from estaban/patch-8 (diff)
parentUpdate Checksum.py (diff)
downloadpyload-add6a442b9b876d55653f070f253e074638f04d2.tar.xz
Merge pull request #1801 from Nippey/patch-1
Checksum.py falsely reports incorrect file size
Diffstat (limited to 'module/plugins/hooks/Checksum.py')
-rw-r--r--module/plugins/hooks/Checksum.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/module/plugins/hooks/Checksum.py b/module/plugins/hooks/Checksum.py
index da4d35df1..64c5fa3ff 100644
--- a/module/plugins/hooks/Checksum.py
+++ b/module/plugins/hooks/Checksum.py
@@ -38,7 +38,7 @@ def compute_checksum(local_file, algorithm):
class Checksum(Addon):
__name__ = "Checksum"
__type__ = "hook"
- __version__ = "0.20"
+ __version__ = "0.21"
__status__ = "testing"
__config__ = [("check_checksum", "bool" , "Check checksum? (If False only size will be verified)", True ),
@@ -114,7 +114,7 @@ class Checksum(Addon):
api_size = int(data['size'])
file_size = os.path.getsize(local_file)
- if api_size is not file_size:
+ if api_size != file_size:
self.log_warning(_("File %s has incorrect size: %d B (%d expected)") % (pyfile.name, file_size, api_size))
self.check_failed(pyfile, local_file, "Incorrect file size")