[Zope-Checkins] CVS: Zope/lib/python/Shared/DC/ZRDB - DA.py:1.108

Christian Theune ct@gocept.com
Wed, 26 Feb 2003 08:23:12 -0500


Update of /cvs-repository/Zope/lib/python/Shared/DC/ZRDB
In directory cvs.zope.org:/tmp/cvs-serv7817

Modified Files:
	DA.py 
Log Message:
Fixed wrong usage of find(). If find is negative, it returns -1 which
evaluates to "True". Correct usage is "if find(...) >= 0".


=== Zope/lib/python/Shared/DC/ZRDB/DA.py 1.107 => 1.108 ===
--- Zope/lib/python/Shared/DC/ZRDB/DA.py:1.107	Mon Dec 16 18:00:36 2002
+++ Zope/lib/python/Shared/DC/ZRDB/DA.py	Wed Feb 26 08:23:11 2003
@@ -430,7 +430,7 @@
             try:     query=apply(self.template, (p,), argdata)
             except TypeError, msg:
                 msg = str(msg)
-                if find(msg,'client'):
+                if find(msg,'client')>=0:
                     raise NameError("'client' may not be used as an " +
                         "argument name in this context")
                 else: raise