summaryrefslogtreecommitdiffstats
path: root/module/plugins/RapidshareCom.py
diff options
context:
space:
mode:
Diffstat (limited to 'module/plugins/RapidshareCom.py')
-rw-r--r--module/plugins/RapidshareCom.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/module/plugins/RapidshareCom.py b/module/plugins/RapidshareCom.py
index 73424696e..7706a7cf7 100644
--- a/module/plugins/RapidshareCom.py
+++ b/module/plugins/RapidshareCom.py
@@ -203,8 +203,9 @@ class RapidshareCom(Plugin):
def check_file(self, local_file):
if self.api_data and self.api_data["checksum"]:
h = hashlib.md5()
- with open(local_file, "rb") as f:
- h.update(f.read())
+ f = open(local_file, "rb"):
+ h.update(f.read())
+ f.close()
hexd = h.hexdigest()
if hexd == self.api_data["checksum"]:
return (True, 0)