diff options
Diffstat (limited to 'module/plugins/hooks/Checksum.py')
-rw-r--r-- | module/plugins/hooks/Checksum.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/module/plugins/hooks/Checksum.py b/module/plugins/hooks/Checksum.py index da4d35df1..2a650768e 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.22" __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") @@ -160,7 +160,7 @@ class Checksum(Addon): return elif check_action == "nothing": return - pyfile.plugin.fail(reason=msg) + pyfile.plugin.fail(msg=msg) def package_finished(self, pypack): |