Add trailing newline when saving.

This commit is contained in:
Guido van Rossum 2002-10-17 13:34:01 +00:00
parent 48123b266c
commit 26a1ac462c

View file

@ -111,6 +111,8 @@ class WikiPage:
try: try:
f = open(self.mkfile(), "w") f = open(self.mkfile(), "w")
f.write(data) f.write(data)
if data and not data.endswith('\n'):
f.write('\n')
f.close() f.close()
return "" return ""
except IOError, err: except IOError, err: