Skip to content

Commit ba4fae8

Browse files
committed
prov: cope with literals
1 parent 008f4d8 commit ba4fae8

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

cwltool/provenance.py

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -801,10 +801,13 @@ def used_artefacts(self,
801801
base += "/" + name
802802
for key, value in job_order.items():
803803
prov_role = self.wf_ns["%s/%s" % (base, key)]
804-
entity = self.declare_artefact(value)
805-
self.document.used(
806-
process_run_id, entity, datetime.datetime.now(), None,
807-
{"prov:role": prov_role})
804+
try:
805+
entity = self.declare_artefact(value)
806+
self.document.used(
807+
process_run_id, entity, datetime.datetime.now(), None,
808+
{"prov:role": prov_role})
809+
except FileNotFoundError:
810+
pass
808811

809812
def generate_output_prov(self,
810813
final_output, # type: Union[Dict[Text, Any], List[Dict[Text, Any]]]
@@ -1577,7 +1580,10 @@ def _relativise_files(self, structure):
15771580
del structure["location"]
15781581

15791582
for val in structure.values():
1580-
self._relativise_files(val)
1583+
try:
1584+
self._relativise_files(val)
1585+
except FileNotFoundError:
1586+
pass
15811587
return
15821588

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

0 commit comments

Comments
 (0)