[Zope3-checkins] CVS: Zope3/src/zope/app/fssync - syncer.py:1.28

Fred L. Drake, Jr. fred at zope.com
Mon Aug 4 18:37:36 EDT 2003


Update of /cvs-repository/Zope3/src/zope/app/fssync
In directory cvs.zope.org:/tmp/cvs-serv18775

Modified Files:
	syncer.py 
Log Message:
Clean up some weird excess code in handling file-like data.


=== Zope3/src/zope/app/fssync/syncer.py 1.27 => 1.28 ===
--- Zope3/src/zope/app/fssync/syncer.py:1.27	Fri Jul 25 16:18:53 2003
+++ Zope3/src/zope/app/fssync/syncer.py	Mon Aug  4 17:37:28 2003
@@ -121,13 +121,9 @@
 
     # Handle data
     if IObjectFile.isImplementedBy(adapter):
-        assert not IObjectDirectory.isImplementedBy(adapter)
         # File
-        data = ''
-        # XXX shouldn't need this if
-        if not os.path.exists(path):
-            data = adapter.getBody()
-            writeFile(data, path)
+        assert not IObjectDirectory.isImplementedBy(adapter)
+        writeFile(adapter.getBody(), path)
     else:
         # Directory
         assert IObjectDirectory.isImplementedBy(adapter)




More information about the Zope3-Checkins mailing list