Skip to content

Commit

Permalink
Only manipulate .output_dir if the task is expected to create outpu…
Browse files Browse the repository at this point in the history
…t files.

This only applies to tasks managed by a session-based script,
see #583 for more details.

Fixes #583
  • Loading branch information
riccardomurri committed Nov 22, 2016
1 parent beb44c3 commit 2326644
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion gc3libs/cmdline.py
Expand Up @@ -1023,7 +1023,8 @@ def _add_new_tasks(self, new_jobs):

def _fix_output_dir(self, task, name):
"""Substitute the NAME string in output paths."""
task.output_dir = task.output_dir.replace('NAME', name)
if task.would_output:
task.output_dir = task.output_dir.replace('NAME', name)
try:
for subtask in task.tasks:
self._fix_output_dir(subtask, name)
Expand Down

0 comments on commit 2326644

Please sign in to comment.