[Zope-Checkins] CVS: Products/AdaptableStorage/gateway_fs - FSConnection.py:1.8

Shane Hathaway shane@zope.com
Tue, 7 Jan 2003 14:03:10 -0500


Update of /cvs-repository/Products/AdaptableStorage/gateway_fs
In directory cvs.zope.org:/tmp/cvs-serv17031

Modified Files:
	FSConnection.py 
Log Message:
Nicer formatting of property files

=== Products/AdaptableStorage/gateway_fs/FSConnection.py 1.7 => 1.8 ===
--- Products/AdaptableStorage/gateway_fs/FSConnection.py:1.7	Mon Jan  6 18:17:41 2003
+++ Products/AdaptableStorage/gateway_fs/FSConnection.py	Tue Jan  7 14:03:07 2003
@@ -250,10 +250,12 @@
                         finally:
                             f.close()
                 else:
-                    if not data.endswith('\n'):
-                        data = data + '\n'
-                    props_f.write('\n[%s]\n' % name)
+                    props_f.write('[%s]\n' % name)
                     props_f.write(data.replace('[', '[['))
+                    if data.endswith('\n'):
+                        props_f.write('\n')
+                    else:
+                        props_f.write('\n\n')
         finally:
             props_f.close()