diff options
author | Guido van Rossum <guido@python.org> | 2002-10-17 13:34:01 +0000 |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2002-10-17 13:34:01 +0000 |
commit | 9cb2ce9070f134f61224a6709d1d5a5fa01e9b58 (patch) | |
tree | ea03ee5a875d27615ab43a87fd387ea26b64e79f | |
parent | cf5b0537a5f962cb90466623d0c84d574999b1e9 (diff) | |
download | cpython-9cb2ce9070f134f61224a6709d1d5a5fa01e9b58.tar.gz |
Add trailing newline when saving.
-rwxr-xr-x | Demo/cgi/cgi3.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Demo/cgi/cgi3.py b/Demo/cgi/cgi3.py index 9aad3a0fc4..205f63df0b 100755 --- a/Demo/cgi/cgi3.py +++ b/Demo/cgi/cgi3.py @@ -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: |