[Python-checkins] python/dist/src/Demo/cgi cgi3.py,1.2,1.3

gvanrossum@users.sourceforge.net gvanrossum@users.sourceforge.net
Thu, 17 Oct 2002 06:34:04 -0700


Update of /cvsroot/python/python/dist/src/Demo/cgi
In directory usw-pr-cvs1:/tmp/cvs-serv14871

Modified Files:
	cgi3.py 
Log Message:
Add trailing newline when saving.


Index: cgi3.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Demo/cgi/cgi3.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** cgi3.py	17 Oct 2002 11:45:54 -0000	1.2
--- cgi3.py	17 Oct 2002 13:34:01 -0000	1.3
***************
*** 112,115 ****
--- 112,117 ----
              f = open(self.mkfile(), "w")
              f.write(data)
+             if data and not data.endswith('\n'):
+                 f.write('\n')
              f.close()
              return ""