File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -2511,8 +2511,17 @@ cdef class job:
25112511 apiError = slurm.slurm_get_errno()
25122512 raise ValueError (slurm.stringOrNone(slurm.slurm_strerror(apiError), ' ' ), apiError)
25132513
2514- def slurm_job_batch_script (uint32_t jobid ):
2515- return slurm.slurm_job_batch_script(slurm.stdout, jobid)
2514+ def slurm_job_batch_script (self , jobid ):
2515+ """
2516+ Retrieve the batch script for a given jobid.
2517+ """
2518+ if isinstance (jobid, int ) or isinstance (jobid, long ):
2519+ jobid = str (jobid).encode(" UTF-8" )
2520+ else :
2521+ jobid = jobid.encode(" UTF-8" )
2522+
2523+ jobid_xlate = slurm.slurm_xlate_job_id(jobid)
2524+ return slurm.slurm_job_batch_script(slurm.stdout, jobid_xlate)
25162525
25172526 cdef int fill_job_desc_from_opts(self , dict job_opts, slurm.job_desc_msg_t * desc):
25182527 """
You can’t perform that action at this time.
0 commit comments