Skip to content

Commit 0e82410

Browse files
authored
convince mypy that cachedir is not None
1 parent 1f69c1e commit 0e82410

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

cwltool/executors.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,9 @@ def execute(self,
9797
path_mapper=runtime_context.path_mapper)
9898

9999
if runtime_context.rm_tmpdir:
100-
if runtime_context.cachedir is not None:
101-
cleanIntermediate(filter(lambda x: not x.startswith(runtime_context.cachedir), self.output_dirs))
100+
cachedir = runtime_context.cachedir
101+
if cachedir is not None:
102+
cleanIntermediate(filter(lambda x: not x.startswith(cachedir), self.output_dirs))
102103
else:
103104
cleanIntermediate(self.output_dirs)
104105

0 commit comments

Comments
 (0)