Skip to content

Commit

Permalink
only add job-name submission arg if job_name is not None
Browse files Browse the repository at this point in the history
  • Loading branch information
truib committed Jun 24, 2024
1 parent 76a263d commit c614a96
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions tasks/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -661,10 +661,9 @@ def submit_job(job, cfg):
build_env_cfg[config.BUILDENV_SETTING_SUBMIT_COMMAND],
build_env_cfg[config.BUILDENV_SETTING_SLURM_PARAMS],
time_limit,
job.slurm_opts,
f"--job-name='{job_name}'",
build_env_cfg[config.BUILDENV_SETTING_BUILD_JOB_SCRIPT],
])
job.slurm_opts] +
([f"--job-name='{job_name}'"] if job_name else []) +
[build_env_cfg[config.BUILDENV_SETTING_BUILD_JOB_SCRIPT]])

cmdline_output, cmdline_error, cmdline_exit_code = run_cmd(command_line,
"submit job for target '%s'" % job.arch_target,
Expand Down

0 comments on commit c614a96

Please sign in to comment.