]> gitweb.fluxo.info Git - ckandumper.git/commitdiff
Do not compute file hash as it might consume too much memory
authorSilvio Rhatto <rhatto@riseup.net>
Thu, 16 May 2019 22:54:32 +0000 (19:54 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Thu, 16 May 2019 22:54:32 +0000 (19:54 -0300)
ckandumper

index cbf71fc87c48bf13ff09937435fe578ddb107efa..55cd13acb8f89eed6860eb561da3b0e5fb39edc5 100755 (executable)
@@ -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)] = []