Commit dbf824f4 authored by R. David Murray's avatar R. David Murray

Fix for Collector 322: generate a more informative error message if

someone tries to use 'client' as an argument to a zsql method.
parent 4dc97b90
......@@ -13,7 +13,7 @@
__doc__='''Generic Database adapter'''
__version__='$Revision: 1.106 $'[11:-2]
__version__='$Revision: 1.107 $'[11:-2]
import OFS.SimpleItem, Aqueduct, RDB, re
import DocumentTemplate, marshal, md5, base64, Acquisition, os
......@@ -426,7 +426,14 @@ class DA(
security=getSecurityManager()
security.addContext(self)
try: query=apply(self.template, (p,), argdata)
try:
try: query=apply(self.template, (p,), argdata)
except TypeError, msg:
msg = str(msg)
if find(msg,'client'):
raise NameError("'client' may not be used as an " +
"argument name in this context")
else: raise
finally: security.removeContext(self)
if src__: return query
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment