Skip to content

Commit 893de46

Browse files
author
Peter Amstutz
committed
Log which step workflow was on when an exception occurred. Tighten cwltool
check that input files exist and are regular files.
1 parent 07aa928 commit 893de46

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

cwltool/job.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ def run(self, dry_run=False, pull_image=True, rm_container=True, rm_tmpdir=True,
4747
(docker_req, docker_is_req) = get_feature(self, "DockerRequirement")
4848

4949
for f in self.pathmapper.files():
50-
if not os.path.exists(self.pathmapper.mapper(f)[0]):
51-
raise WorkflowException("Required input file %s not found" % self.pathmapper.mapper(f)[0])
50+
if not os.path.isfile(self.pathmapper.mapper(f)[0]):
51+
raise WorkflowException("Required input file %s not found or is not a regular file." % self.pathmapper.mapper(f)[0])
5252

5353
img_id = None
5454
if docker_req and kwargs.get("use_container") is not False:

cwltool/workflow.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -472,6 +472,7 @@ def job(self, joborder, basedir, output_callback, **kwargs):
472472
**kwargs):
473473
yield t
474474
except WorkflowException:
475+
_logger.error("Exception on step '%s'", kwargs.get("name"))
475476
raise
476477
except Exception as e:
477478
_logger.exception("Unexpected exception")

0 commit comments

Comments
 (0)