saltstack/salt — pull request #7655 by flupke (2013-10-07 14:25:13+00:00)
Title: Checking for newline at EOF in modules.file.append()

This patch makes sure that a newline is present at end of file before appending.

In files not ending with a newline, it avoids ending with the last original line mixed up with the first appended line.