From fed9df82c4ea2ffef914a115ea1134d899021d42 Mon Sep 17 00:00:00 2001
From: Adrian Schmitz <a.schmitz@itc.rwth-aachen.de>
Date: Mon, 9 Oct 2023 15:27:37 +0200
Subject: [PATCH] HOTFIX: Catch Slurm errors and remove

Signed-off-by: Adrian Schmitz <a.schmitz@itc.rwth-aachen.de>
---
 core/modes/slurm/shared.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/core/modes/slurm/shared.py b/core/modes/slurm/shared.py
index 1355f29..61bdf3f 100644
--- a/core/modes/slurm/shared.py
+++ b/core/modes/slurm/shared.py
@@ -37,7 +37,11 @@ class SingleSlurmJobAcrossStages(Slurm, ABC):
                      self.job.get_parameters().split(" ")
             salloc_out = self.executor.allocator(params=' '.join(params))
             logging.debug(f'run_properties salloc_out={salloc_out}')
-            self.slurm_job_id = re.search(r'salloc: job (\d+)', salloc_out).group(1)
+            try:
+                self.slurm_job_id = re.search(r'salloc: job (\d+)', salloc_out).group(1)
+            except:
+                logging.error(f'run_properties salloc_out={salloc_out}')
+
             with open(self.slurm_jobid_file, 'w+') as slurm_jobid_fp:
                 slurm_jobid_fp.write(self.slurm_job_id + '\n')
             with open(self.cc_slurm_jobid_file, 'w+') as slurm_jobid_fp:
-- 
GitLab