diff --git a/lstmcpipe/tests/test_utils.py b/lstmcpipe/tests/test_utils.py index 79577572..505671e4 100644 --- a/lstmcpipe/tests/test_utils.py +++ b/lstmcpipe/tests/test_utils.py @@ -86,7 +86,7 @@ def test_sbatch_lst_mc_stage(): sbatch.extra_slurm_options = None sbatch.slurm_dependencies = "123,243,345,456" - assert sbatch._construct_slurm_dependencies() == "--dependency=afterok:123,243,345,456" + assert sbatch._construct_slurm_dependencies() == "--dependency=afterok:123:243:345:456" sbatch.compose_wrap_command( wrap_command="python args", diff --git a/lstmcpipe/utils.py b/lstmcpipe/utils.py index 6ab30635..723c7eaa 100644 --- a/lstmcpipe/utils.py +++ b/lstmcpipe/utils.py @@ -285,7 +285,7 @@ def _construct_slurm_dependencies(self): if slurm_deps is None or slurm_deps == "": return "" elif all(items != "" for items in slurm_deps.split(",")): - return f"--dependency={dependency_type}:{slurm_deps}" + return f"--dependency={dependency_type}:{slurm_deps.replace(',',':')}" else: raise ValueError("Slurm dependencies contain an empty value between commas, i.e.; ,'', ")