Commit 8b60ddfe authored by Aurel's avatar Aurel

add compatibility with script that takes no argument


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@14975 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 5efdf20e
......@@ -162,7 +162,11 @@ class Predicate(XMLObject, Folder):
for test_method_id in test_method_id_list :
if (test_method_id is not None) and result:
method = getattr(context,test_method_id)
try:
result = result and method(self)
except TypeError:
# backward compatibilty with script that takes no argument
result = result and method()
# LOG('predicate test', 0,
# '%s after method %s ' % (result, test_method_id))
return result
......
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