Allow file rendering to pass in a file permission when writing.

This commit is contained in:
Joshua Harlow 2012-06-16 08:57:05 -07:00
parent 58135f1538
commit 09abe287ab

View File

@ -29,9 +29,9 @@ def render_from_file(fn, params):
return render_string(util.load_file(fn), params, name=fn) return render_string(util.load_file(fn), params, name=fn)
def render_to_file(fn, outfn, params): def render_to_file(fn, outfn, params, mode=0644):
contents = render_from_file(fn, params) contents = render_from_file(fn, params)
util.write_file(outfn, contents) util.write_file(outfn, contents, mode=mode)
def render_string(content, params, name=None): def render_string(content, params, name=None):