Skip to content

Commit f960ac6

Browse files
committed
prov: support Directory in secondaryFiles
1 parent 59db357 commit f960ac6

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

cwltool/provenance.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,12 @@ def declare_file(self, value):
545545
# Check for secondaries
546546
for sec in value.get("secondaryFiles", ()):
547547
# TODO: Record these in a specializationOf entity with UUID?
548-
(sec_entity, _, _) = self.declare_file(sec)
548+
if sec['class'] == "File":
549+
(sec_entity, _, _) = self.declare_file(sec)
550+
elif sec['class'] == "Directory":
551+
sec_entity = self.declare_directory(sec)
552+
else:
553+
raise ValueError("Got unexpected secondaryFiles value: {}".format(sec))
549554
# We don't know how/when/where the secondary file was generated,
550555
# but CWL convention is a kind of summary/index derived
551556
# from the original file. As its generally in a different format

0 commit comments

Comments
 (0)