Skip to content

Commit b6ad12b

Browse files
committed
simplify function
1 parent 23a4261 commit b6ad12b

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

cwltool/job.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,7 @@ def create_file_and_add_volume(self,
480480
volume, # type: MapperEnt
481481
host_outdir_tgt, # type: Optional[Text]
482482
secret_store # type: Optional[SecretStore]
483-
): # type: (...) -> Optional[Text]
483+
): # type: (...) -> Text
484484
"""Create the file and add a mapping."""
485485
if not host_outdir_tgt:
486486
new_file = os.path.join(
@@ -506,7 +506,6 @@ def create_file_and_add_volume(self,
506506
return host_outdir_tgt or new_file
507507

508508

509-
510509
def add_volumes(self,
511510
pathmapper, # type: PathMapper
512511
runtime, # type: List[Text]
@@ -538,7 +537,7 @@ def add_volumes(self,
538537
new_path = self.create_file_and_add_volume(
539538
runtime, vol, host_outdir_tgt, secret_store)
540539
key = pathmapper.reversemap(vol.target)
541-
if key and new_path:
540+
if key:
542541
pathmapper.update(
543542
key[0], new_path, vol.target, vol.type, vol.staged)
544543

0 commit comments

Comments
 (0)