Skip to content

Commit 7775c13

Browse files
committed
make the checksums streaming safe
1 parent db0fe1c commit 7775c13

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

cwltool/process.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -976,7 +976,5 @@ def compute_checksums(fs_access, fileobj):
976976
while contents != b"":
977977
checksum.update(contents)
978978
contents = f.read(1024 * 1024)
979-
f.seek(0, 2)
980-
filesize = f.tell()
981979
fileobj["checksum"] = "sha1$%s" % checksum.hexdigest()
982-
fileobj["size"] = filesize
980+
fileobj["size"] = fs_access.size(fileobj["location"])

tests/test_deps_env/random-lines/1.0/scripts/random-lines

-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ def get_random( line_offsets, num_lines ):
3030

3131

3232
def __main__():
33-
open("/Users/john/moo", "w").write("cow")
3433
parser = optparse.OptionParser()
3534
parser.add_option( '-s', '--seed', dest='seed', action='store', type="string", default=None, help='Set the random seed.' )
3635
(options, args) = parser.parse_args()

0 commit comments

Comments
 (0)