[CMF-checkins] CVS: Products/DCWorkflow - Guard.py:1.17

Julien Anguenot ja at nuxeo.com
Tue Apr 26 10:59:29 EDT 2005


Update of /cvs-repository/Products/DCWorkflow
In directory cvs.zope.org:/tmp/cvs-serv5921

Modified Files:
	Guard.py 
Log Message:
check() accept **kw that are propagated to StateChangeInfo() constructor


=== Products/DCWorkflow/Guard.py 1.16 => 1.17 ===
--- Products/DCWorkflow/Guard.py:1.16	Thu Aug 12 11:07:44 2004
+++ Products/DCWorkflow/Guard.py	Tue Apr 26 10:59:28 2005
@@ -44,7 +44,7 @@
 
     guardForm = DTMLFile('guard', _dtmldir)
 
-    def check(self, sm, wf_def, ob):
+    def check(self, sm, wf_def, ob, **kw):
         """Checks conditions in this guard.
         """
         u_roles = None
@@ -85,7 +85,8 @@
                 return 0
         expr = self.expr
         if expr is not None:
-            econtext = createExprContext(StateChangeInfo(ob, wf_def))
+            econtext = createExprContext(
+                StateChangeInfo(ob, wf_def, kwargs=kw))
             res = expr(econtext)
             if not res:
                 return 0



More information about the CMF-checkins mailing list