End nginx configuration files with a newline

This commit is contained in:
Ceesjan Luiten
2015-07-13 20:02:34 +02:00
parent 1f552cab74
commit 88c824c0ec
4 changed files with 4 additions and 4 deletions
@@ -85,7 +85,7 @@ class RawNginxDumper(object):
def as_string(self):
"""Return the parsed block as a string."""
return '\n'.join(self)
return '\n'.join(self) + '\n'
# Shortcut functions to respect Python's serialization interface
@@ -63,7 +63,7 @@ class TestRawNginxParser(unittest.TestCase):
' image/jpeg jpg;\n'
' }\n'
' }\n'
'}')
'}\n')
def test_parse_from_file(self):
with open(util.get_data_filename('foo.conf')) as handle:
@@ -8,4 +8,4 @@ server {
#
listen 1234;
# listen 80;
}
}
@@ -80,4 +80,4 @@ http {
index index.html index.htm;
}
}
}
}