Skip to content

Commit b909761

Browse files
authored
Merge branch 'master' into toil-prov
2 parents 797a750 + ba16b65 commit b909761

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

cwltool/main.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -850,6 +850,8 @@ def remove_at_id(doc): # type: (MutableMapping[Text, Any]) -> None
850850
if isinstance(entry, MutableMapping):
851851
remove_at_id(entry)
852852
remove_at_id(out)
853+
visit_class(out, ("File",), functools.partial(
854+
add_sizes, runtimeContext.make_fs_access('')))
853855

854856
def loc_to_path(obj): # type: (Dict[Text, Any]) -> None
855857
for field in ("path", "nameext", "nameroot", "dirname"):

cwltool/provenance.py

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -804,10 +804,13 @@ def used_artefacts(self,
804804
base += "/" + name
805805
for key, value in job_order.items():
806806
prov_role = self.wf_ns["%s/%s" % (base, key)]
807-
entity = self.declare_artefact(value)
808-
self.document.used(
809-
process_run_id, entity, datetime.datetime.now(), None,
810-
{"prov:role": prov_role})
807+
try:
808+
entity = self.declare_artefact(value)
809+
self.document.used(
810+
process_run_id, entity, datetime.datetime.now(), None,
811+
{"prov:role": prov_role})
812+
except OSError:
813+
pass
811814

812815
def generate_output_prov(self,
813816
final_output, # type: Union[Dict[Text, Any], List[Dict[Text, Any]]]
@@ -1580,7 +1583,10 @@ def _relativise_files(self, structure):
15801583
del structure["location"]
15811584

15821585
for val in structure.values():
1583-
self._relativise_files(val)
1586+
try:
1587+
self._relativise_files(val)
1588+
except OSError:
1589+
pass
15841590
return
15851591

15861592
if isinstance(structure, (str, Text)):

0 commit comments

Comments
 (0)