summaryrefslogtreecommitdiffstats
path: root/module/plugins/hooks/Checksum.py
diff options
context:
space:
mode:
Diffstat (limited to 'module/plugins/hooks/Checksum.py')
-rw-r--r--module/plugins/hooks/Checksum.py23
1 files changed, 5 insertions, 18 deletions
diff --git a/module/plugins/hooks/Checksum.py b/module/plugins/hooks/Checksum.py
index a51eb4b47..0fe2ae88c 100644
--- a/module/plugins/hooks/Checksum.py
+++ b/module/plugins/hooks/Checksum.py
@@ -1,29 +1,16 @@
# -*- coding: utf-8 -*-
-"""
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License,
- or (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- See the GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, see <http://www.gnu.org/licenses/>.
-"""
-
from __future__ import with_statement
+
import hashlib
+import re
import zlib
+
from os import remove
from os.path import getsize, isfile, splitext
-import re
-from module.utils import save_join, fs_encode
from module.plugins.Hook import Hook
+from module.utils import save_join, fs_encode
def computeChecksum(local_file, algorithm):
@@ -52,8 +39,8 @@ def computeChecksum(local_file, algorithm):
class Checksum(Hook):
__name__ = "Checksum"
- __version__ = "0.12"
__type__ = "hook"
+ __version__ = "0.12"
__config__ = [("activated", "bool", "Activated", False),
("check_action", "fail;retry;nothing", "What to do if check fails?", "retry"),