diff options
author | mkaay <mkaay@mkaay.de> | 2009-11-13 22:15:48 +0100 |
---|---|---|
committer | mkaay <mkaay@mkaay.de> | 2009-11-13 22:15:48 +0100 |
commit | f917c7fd36a744744880854608a5ed717fa755a0 (patch) | |
tree | ee522d5bf23899c3a1d7cfa267e3b4a3c48bc3b0 /module/plugins/UploadedTo.py | |
parent | ddl-music.org container decryption (diff) | |
download | pyload-f917c7fd36a744744880854608a5ed717fa755a0.tar.xz |
python25 compatibility
Diffstat (limited to 'module/plugins/UploadedTo.py')
-rw-r--r-- | module/plugins/UploadedTo.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/module/plugins/UploadedTo.py b/module/plugins/UploadedTo.py index 9ae008480..bda0bf899 100644 --- a/module/plugins/UploadedTo.py +++ b/module/plugins/UploadedTo.py @@ -145,8 +145,9 @@ class UploadedTo(Plugin): def check_file(self, local_file): if self.api_data and self.api_data["checksum"]: h = hashlib.sha1() - 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) |