Skip to content

Commit 9bac524

Browse files
committed
Update sbatch_config validation to check for 'python "$@"' presence in batch_run
1 parent ffeab22 commit 9bac524

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

face_rhythm/util.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1225,9 +1225,8 @@ def rep_inputs(item, n_jobs):
12251225
json.dump(params_list[ii], f)
12261226

12271227
# Prepare the sbatch_config
1228-
## assert that the last line of the sbatch_config_list is 'python "$@"'
1229-
last_line = sbatch_config_list[ii].split('\n')[-1]
1230-
assert last_line == 'python "$@"', f'ERROR: last line of sbatch_config_list must be exactly: python "$@"\nfound: {last_line}'
1228+
## assert the search term 'python "$@"' is in the sbatch_config_list
1229+
assert 'python "$@"' in sbatch_config_list[ii], "FR ERROR: sbatch_config_list must contain 'python \"$@\"' at the end"
12311230
## Replace the "$@" with the arguments
12321231
sbatch_config_list[ii] = sbatch_config_list[ii].replace(
12331232
'python "$@"',

0 commit comments

Comments
 (0)