[Zope-Checkins] CVS: Zope/lib/python/Shared/DC/ZRDB - Aqueduct.py:1.52

Andreas Jung andreas@zope.com
Mon, 13 Aug 2001 10:57:56 -0400


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

Modified Files:
	Aqueduct.py 
Log Message:
fixed strange behaviour where ZSQL methods with omitted parameters
never worked as supposed to work.


=== Zope/lib/python/Shared/DC/ZRDB/Aqueduct.py 1.51 => 1.52 ===
 __doc__='''Shared classes and functions
 
-__version__='$Revision$'[11:-2]
 $Id$'''
+__version__='$Revision$'[11:-2]
 
 import Globals, os
 from Globals import Persistent
@@ -146,10 +146,20 @@
                             if not arg['optional']: missing.append(name)
                         except: missing.append(name)
                     
-        if missing:
-            raise self.MissingArgumentError,  \
-                "The following arguments were omitted " \
-                " from the ZSQL method call: %s" % str(missing)
+        # Note: the code above tries to check if an argument of the
+        # ZSQL method above has the "optional" flag set (in case the
+        # argument is omitted from the ZSQL function call). But there
+        # is neither corresponding code inside the parse() function to 
+        # check for the "optional" parameter nor any documentation. 
+        # So we omit the check for the optional parameter. There will
+        # be probably no code break but there will be hopefully more code
+        # to work as supposed to work.
+
+#        if missing:
+#            raise self.MissingArgumentError,  \
+#                "The following arguments were omitted " \
+#                " from the ZSQL method call: %s" % str(missing)
+#
 
         return r