End nginx configuration files with a newline

This commit is contained in:
Ceesjan Luiten 2015-07-11 11:04:25 +02:00
parent 1f552cab74
commit 88c824c0ec
4 changed files with 4 additions and 4 deletions

View file

@ -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

View file

@ -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:

View file

@ -8,4 +8,4 @@ server {
#
listen 1234;
# listen 80;
}
}

View file

@ -80,4 +80,4 @@ http {
index index.html index.htm;
}
}
}
}