summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster/UploadedTo.py
diff options
context:
space:
mode:
authorGravatar mkaay <mkaay@mkaay.de> 2010-02-17 21:30:46 +0100
committerGravatar mkaay <mkaay@mkaay.de> 2010-02-17 21:30:46 +0100
commitb61a1288fd32f09120141fb5d6b8edcd8d5dbba5 (patch)
tree54bd817d3cca43b8d6bce1c505bc515b3566abb4 /module/plugins/hoster/UploadedTo.py
parentdjango builtin server improvement (diff)
downloadpyload-b61a1288fd32f09120141fb5d6b8edcd8d5dbba5.tar.xz
checksum now consumes less memory, fixed cookie cleaning
Diffstat (limited to 'module/plugins/hoster/UploadedTo.py')
-rw-r--r--module/plugins/hoster/UploadedTo.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/module/plugins/hoster/UploadedTo.py b/module/plugins/hoster/UploadedTo.py
index 38529eb4f..852e77cd4 100644
--- a/module/plugins/hoster/UploadedTo.py
+++ b/module/plugins/hoster/UploadedTo.py
@@ -146,7 +146,11 @@ class UploadedTo(Plugin):
if self.api_data and self.api_data["checksum"]:
h = hashlib.sha1()
f = open(local_file, "rb")
- h.update(f.read())
+ while True:
+ data = f.read(128)
+ if not data:
+ break
+ h.update(data)
f.close()
hexd = h.hexdigest()
if hexd == self.api_data["checksum"]: