Skip to content

Commit

Permalink
Remove extraneous endlines in rendered output.
Browse files Browse the repository at this point in the history
  • Loading branch information
tbenthompson committed Oct 16, 2020
1 parent f6d8780 commit 00c40d9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cppimport/templating.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,5 +59,8 @@ def run_templating(module_data):
print(mako.exceptions.text_error_template().render())

rendered_src_filepath = get_rendered_source_filepath(filepath)
open(rendered_src_filepath, 'w').write(buf.getvalue())

with open(rendered_src_filepath, 'w', newline = '') as f:
f.write(buf.getvalue())

module_data['rendered_src_filepath'] = rendered_src_filepath

0 comments on commit 00c40d9

Please sign in to comment.