aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2019-05-16 19:54:32 -0300
committerSilvio Rhatto <rhatto@riseup.net>2019-05-16 19:54:32 -0300
commit5b6309b8bce616ef2b4746166addfbf40ebe3202 (patch)
treec674372025cfd1484291778e273c0845066fc395
parent39f9a75856419ca9b7de9cbd8b55d5514f0828aa (diff)
downloadckandumper-5b6309b8bce616ef2b4746166addfbf40ebe3202.tar.gz
ckandumper-5b6309b8bce616ef2b4746166addfbf40ebe3202.tar.bz2
Do not compute file hash as it might consume too much memory
-rwxr-xr-xckandumper11
1 files changed, 6 insertions, 5 deletions
diff --git a/ckandumper b/ckandumper
index cbf71fc..55cd13a 100755
--- a/ckandumper
+++ b/ckandumper
@@ -95,11 +95,12 @@ class DownloadMultiple:
output.write(str(datetime.datetime.now()) + '\n')
output.close()
- if os.path.exists(local_filename):
- content = open(local_filename, 'rb')
- output = open(local_filename + '.sha256', 'w')
- output.write(sha256(content.read()).hexdigest() + ' ' + os.path.basename(local_filename) + '\n')
- output.close()
+ # File might be too big, so we're not computing it's hash here
+ #if os.path.exists(local_filename):
+ # content = open(local_filename, 'rb')
+ # output = open(local_filename + '.sha256', 'w')
+ # output.write(sha256(content.read()).hexdigest() + ' ' + os.path.basename(local_filename) + '\n')
+ # output.close()
if not str(proc.returncode) in self.globalstats['exitstatus']:
self.globalstats['exitstatus'][str(proc.returncode)] = []