[Zope3-checkins] CVS: Zope3/utilities/fssync - common.py:1.6
Guido van Rossum
guido@python.org
Tue, 6 May 2003 15:16:22 -0400
Update of /cvs-repository/Zope3/utilities/fssync
In directory cvs.zope.org:/tmp/cvs-serv21703
Modified Files:
common.py
Log Message:
Remove some redundant code.
=== Zope3/utilities/fssync/common.py 1.5 => 1.6 ===
--- Zope3/utilities/fssync/common.py:1.5 Mon May 5 17:20:53 2003
+++ Zope3/utilities/fssync/common.py Tue May 6 15:16:21 2003
@@ -102,7 +102,7 @@
def getObjectData(ob):
"""Returns the data of a ZODB object.
"""
- adapter = adapter = getObjectAdapter(ob)
+ adapter = getObjectAdapter(ob)
return adapter.getBody()
def getObjectDataTempfile(targetfile, objpath, dbpath, siteconfpath):
@@ -192,18 +192,12 @@
def checkConflictData(sandbox_path, zopedb_path):
"""Checks for conflict data in the filesystem.
"""
- isConflict = 0
f = open(sandbox_path,'r')
data = f.read()
f.close()
filter1 = '<<<<<<< %s' % (sandbox_path)
filter2 = '>>>>>>> %s' % (zopedb_path)
- if data.find(filter1) >= 0 and data.find(filter2) >= 0:
- isConflict = 1
- else:
- isConflict = 0
-
- return isConflict
+ return data.find(filter1) >= 0 and data.find(filter2) >= 0
def makeNewEntry(admin_dir, name=None, type=None, factory=None,
objpath=None, isNew=None):