mirror of
https://github.com/python/cpython.git
synced 2025-11-02 11:08:57 +00:00
Add trailing newline when saving.
This commit is contained in:
parent
48123b266c
commit
26a1ac462c
1 changed files with 2 additions and 0 deletions
|
|
@ -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:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue