Skip to content

Commit a98161d

Browse files
authored
Merge pull request pharmbio#48 from pietromarchesi/bytesencoding
Added casting to string of slurm_stderr and jobinfo_stdout
2 parents de6cb43 + 9dc96cb commit a98161d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sciluigi/slurm.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -191,14 +191,14 @@ def log_slurm_info(self, slurm_stderr):
191191
salloc: Job allocation 5836263 has been revoked.
192192
'''
193193

194-
matches = re.search('[0-9]+', slurm_stderr)
194+
matches = re.search('[0-9]+', str(slurm_stderr))
195195
if matches:
196196
jobid = matches.group(0)
197197

198198
# Write slurm execution time to audit log
199199
cmd = 'sacct -j {jobid} --noheader --format=elapsed'.format(jobid=jobid)
200200
(_, jobinfo_stdout, _) = self.ex_local(cmd)
201-
sacct_matches = re.findall('([0-9\:\-]+)', jobinfo_stdout)
201+
sacct_matches = re.findall('([0-9\:\-]+)', str(jobinfo_stdout))
202202

203203
if len(sacct_matches) < 2:
204204
log.warn('Not enough matches from sacct for task %s: %s',

0 commit comments

Comments
 (0)