Skip to content

Commit

Permalink
Changed substitute to safe_substitute so that it can take keywords th…
Browse files Browse the repository at this point in the history
…at don't exists in the template.
  • Loading branch information
grabear committed Aug 14, 2019
1 parent 9a1a455 commit 86a3953
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions OrthoEvol/Tools/pbs/qsub.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,12 +254,12 @@ def format_template_string(self, code=None, template=None, attributes=None):

if code and attributes is not None:
code_template = string.Template(code)
code = code_template.substitute(attributes)
code = code_template.safe_substitute(attributes)
elif template and attributes is not None:
with open(str(template), 'r') as tem:
code = tem.read()
code_template = string.Template(code)
code = code_template.substitute(attributes)
code = code_template.safe_substitute(attributes)
else:
code = None
return code
Expand Down

0 comments on commit 86a3953

Please sign in to comment.