mirror of
https://github.com/python/cpython.git
synced 2025-11-02 03:01:58 +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:
|
||||
f = open(self.mkfile(), "w")
|
||||
f.write(data)
|
||||
if data and not data.endswith('\n'):
|
||||
f.write('\n')
|
||||
f.close()
|
||||
return ""
|
||||
except IOError, err:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue