Skip to content

Commit 71c2019

Browse files
authored
Fix typo
1 parent 5d37e32 commit 71c2019

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

snakemake_executor_plugin_slurm/utils.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -360,9 +360,8 @@ def set_gres_string(job: JobExecutorInterface) -> str:
360360
gres = ""
361361
if job.resources.get("gres"):
362362
# Validate GRES format (e.g., "gpu:1", "gpu:tesla:2")
363-
gres = job.resources.gres
364-
if not gres_re.match(gres):
365-
if not string_check.match(gres):
363+
if not gres_re.match(job.resources.gres):
364+
if not string_check.match(job.resources.gres):
366365
raise WorkflowError(
367366
"GRES format should not be a nested string (start "
368367
"and end with ticks or quotation marks). "
@@ -373,7 +372,7 @@ def set_gres_string(job: JobExecutorInterface) -> str:
373372
)
374373
else:
375374
raise WorkflowError(
376-
f"Invalid GRES format: {gres}. Expected format: "
375+
f"Invalid GRES format: {job.resources.gres}. Expected format: "
377376
"'<name>:<number>' or '<name>:<type>:<number>' with an optional "
378377
"'T' 'M' or 'G' postfix "
379378
"(e.g., 'gpu:1' or 'gpu:tesla:2') "

0 commit comments

Comments
 (0)