def _write_submit_script(self, script_string, script_filename):
try:<EOL><INDENT>with open(script_filename, '<STR_LIT:w>') as f:<EOL><INDENT>f.write(script_string)<EOL><DEDENT><DEDENT>except KeyError as e:<EOL><INDENT>logger.error("<STR_LIT>", e)<EOL>raise (SchedulerMissingArgs(e.args, self.label))<EOL><DEDENT>except IOError as e:<EOL><INDENT>logger.error("<STR_LIT>", script_filename)<EOL>raise (ScriptPathError(script_filename, e))<EOL><DEDENT>return True<EOL>
Load the template string with config values and write the generated submit script to
a submit script file.

Args:
      - template_string (string) : The template string to be used for the writing submit script
      - script_filename (string) : Name of the submit script

Returns:
      - True: on success

Raises:
      SchedulerMissingArgs : If template is missing args
      ScriptPathError : Unable to write submit script out