Commit 232ce2cb authored by Morris Jette's avatar Morris Jette
Browse files

job_submit/lua: refinements, fallback to avoid error

 1. Simplification by generating the indices via the built-in ipairs function.

 2. Avoid encountering an error when trying to unset job_desc fields by
    assigning the  special Lua value `nil':

    [2011-04-23T13:28:51] error: job_submit/lua: /opt/slurm/default/etc/job_submit.lua:106: \
			bad argument #3 to '_set_job_req_field' (string expected, got nil)
    The error is avoided by testing for a nil value and using an empty string instead.

Tested script to work after applying changes.
Patch from Gerrit Renker, CSCS.
parent ef0b0d49
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment