Skip to content

Commit 9f964a8

Browse files
committed
Merge branch 'unicode_literal_usage' of github.com:manu-chroma/cwltool into unicode_literal_usage
2 parents c51e2ef + 76b017e commit 9f964a8

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

cwltool/draft2tool.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,10 +223,17 @@ def job(self,
223223
cmdline = ["docker", "run", dockerimg] + cmdline
224224
keydict = {u"cmdline": cmdline}
225225

226-
for _, f in cachebuilder.pathmapper.items():
226+
for location, f in cachebuilder.pathmapper.items():
227227
if f.type == "File":
228+
checksum = next((e['checksum'] for e in cachebuilder.files
229+
if 'location' in e and e['location'] == location
230+
and 'checksum' in e
231+
and e['checksum'] != 'sha1$hash'), None)
228232
st = os.stat(f.resolved)
229-
keydict[f.resolved] = [st.st_size, int(st.st_mtime * 1000)]
233+
if checksum:
234+
keydict[f.resolved] = [st.st_size, checksum]
235+
else:
236+
keydict[f.resolved] = [st.st_size, int(st.st_mtime * 1000)]
230237

231238
interesting = {"DockerRequirement",
232239
"EnvVarRequirement",

0 commit comments

Comments
 (0)