From b61a1288fd32f09120141fb5d6b8edcd8d5dbba5 Mon Sep 17 00:00:00 2001 From: mkaay Date: Wed, 17 Feb 2010 21:30:46 +0100 Subject: checksum now consumes less memory, fixed cookie cleaning --- module/plugins/hoster/NetloadIn.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'module/plugins/hoster/NetloadIn.py') diff --git a/module/plugins/hoster/NetloadIn.py b/module/plugins/hoster/NetloadIn.py index 46afc4080..d0e5b89ba 100644 --- a/module/plugins/hoster/NetloadIn.py +++ b/module/plugins/hoster/NetloadIn.py @@ -146,7 +146,11 @@ class NetloadIn(Plugin): if self.api_data and self.api_data["checksum"]: h = hashlib.md5() 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"]: -- cgit v1.2.3