Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions alembic/util/pyfiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ def template_to_file(
)
else:
with open(dest, "ab" if append else "wb") as f:
if append:
f.write(b"\n\n")
f.write(output)


Expand Down
7 changes: 7 additions & 0 deletions docs/build/unreleased/1679.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.. change::
:tags: bug, command
:tickets: 1679

Updated ``utils.pyfiles.template_to_file`` to write two newlines before
the template file data in ``append``` mode.