|
49 | 49 | ACCEPTLIST_EN_STRICT_RE = re.compile(r"^[a-zA-Z0-9._+-]+$")
|
50 | 50 | ACCEPTLIST_EN_RELAXED_RE = re.compile(r".*") # Accept anything
|
51 | 51 | ACCEPTLIST_RE = ACCEPTLIST_EN_STRICT_RE
|
52 |
| -DEFAULT_CONTAINER_MSG =\ |
53 |
| -"""We are on Microsoft Windows and not all components of this CWL description have a |
| 52 | +DEFAULT_CONTAINER_MSG = """ |
| 53 | +We are on Microsoft Windows and not all components of this CWL description have a |
54 | 54 | container specified. This means that these steps will be executed in the default container,
|
55 | 55 | which is %s.
|
56 | 56 |
|
@@ -311,19 +311,23 @@ def job(self,
|
311 | 311 | # not really run using docker, just for hashing purposes
|
312 | 312 | keydict = {u"cmdline": cmdline}
|
313 | 313 |
|
314 |
| - if "stdout" in self.tool: |
315 |
| - keydict["stdout"] = self.tool["stdout"] |
316 |
| - for location, f in cachebuilder.pathmapper.items(): |
317 |
| - if f.type == "File": |
318 |
| - checksum = next((e['checksum'] for e in cachebuilder.files |
319 |
| - if 'location' in e and e['location'] == location |
320 |
| - and 'checksum' in e |
321 |
| - and e['checksum'] != 'sha1$hash'), None) |
322 |
| - st = os.stat(f.resolved) |
| 314 | + for shortcut in ["stdout", "stderr"]: # later, add "stdin" |
| 315 | + if shortcut in self.tool: |
| 316 | + keydict[shortcut] = self.tool[shortcut] |
| 317 | + |
| 318 | + for location, fobj in cachebuilder.pathmapper.items(): |
| 319 | + if fobj.type == "File": |
| 320 | + checksum = next( |
| 321 | + (e['checksum'] for e in cachebuilder.files |
| 322 | + if 'location' in e and e['location'] == location |
| 323 | + and 'checksum' in e |
| 324 | + and e['checksum'] != 'sha1$hash'), None) |
| 325 | + fobj_stat = os.stat(fobj.resolved) |
323 | 326 | if checksum:
|
324 |
| - keydict[f.resolved] = [st.st_size, checksum] |
| 327 | + keydict[fobj.resolved] = [fobj_stat.st_size, checksum] |
325 | 328 | else:
|
326 |
| - keydict[f.resolved] = [st.st_size, int(st.st_mtime * 1000)] |
| 329 | + keydict[fobj.resolved] = [fobj_stat.st_size, |
| 330 | + int(fobj_stat.st_mtime * 1000)] |
327 | 331 |
|
328 | 332 | interesting = {"DockerRequirement",
|
329 | 333 | "EnvVarRequirement",
|
|
0 commit comments