[Zope3-checkins] CVS: Zope3/utilities/fssync - commit.py:1.5 diff.py:1.5
Guido van Rossum
guido@python.org
Mon, 5 May 2003 17:53:14 -0400
Update of /cvs-repository/Zope3/utilities/fssync
In directory cvs.zope.org:/tmp/cvs-serv3032
Modified Files:
commit.py diff.py
Log Message:
Replace "if x.find(' ') >= 0" with "if ' ' in x".
=== Zope3/utilities/fssync/commit.py 1.4 => 1.5 ===
--- Zope3/utilities/fssync/commit.py:1.4 Mon May 5 17:33:15 2003
+++ Zope3/utilities/fssync/commit.py Mon May 5 17:53:13 2003
@@ -66,7 +66,7 @@
fmt_sandbox_path = ''
fmt_original_path = ''
for dir in sandbox_path.split(os.sep):
- if dir.find(' ') >= 0:
+ if ' ' in dir:
fmt_sandbox_path = os.path.join(fmt_sandbox_path,
"'"+dir+"'")
else:
@@ -74,7 +74,7 @@
dir)
for dir in original_path.split(os.sep):
- if dir.find(' ') >= 0:
+ if ' ' in dir:
fmt_original_path = os.path.join(fmt_original_path,
"'"+dir+"'")
else:
=== Zope3/utilities/fssync/diff.py 1.4 => 1.5 ===
--- Zope3/utilities/fssync/diff.py:1.4 Mon May 5 17:46:08 2003
+++ Zope3/utilities/fssync/diff.py Mon May 5 17:53:13 2003
@@ -41,7 +41,7 @@
os.path.join(os.path.abspath(os.path.dirname(targetfile)), '@@Zope')):
return 'sync [diff aborted] : @@Zope administrative folder not found'
- if os.path.basename(targetfile).find(' ') >= 0:
+ if ' ' in os.path.basename(targetfile):
targetfile = os.path.join(os.path.dirname(targetfile),
"'"+os.path.basename(targetfile)+"'")