[CMF-checkins] CVS: Products/CMFCore - ActionInformation.py:1.26.2.4

Tres Seaver tseaver at palladion.com
Sun Jun 26 06:59:00 EDT 2005


Update of /cvs-repository/Products/CMFCore
In directory cvs.zope.org:/tmp/cvs-serv16447/CMFCore

Modified Files:
      Tag: CMF-1_5-branch
	ActionInformation.py 
Log Message:


 - Make ActionInfo.setActionExpression sane if passed a string
   which is already prefixed with "string;".

 - Wrap long lines.


=== Products/CMFCore/ActionInformation.py 1.26.2.3 => 1.26.2.4 ===
--- Products/CMFCore/ActionInformation.py:1.26.2.3	Thu Jun 23 04:24:56 2005
+++ Products/CMFCore/ActionInformation.py	Sun Jun 26 06:58:30 2005
@@ -267,7 +267,8 @@
         action = self._getActionObject()
         expr = action and action.text or ''
         if expr and isinstance(expr, basestring):
-            if not expr.startswith('string:') and not expr.startswith('python:'):
+            if ( not expr.startswith('string:')
+                 and not expr.startswith('python:') ):
                 expr = 'string:${object_url}/%s' % expr
                 self.action = Expression( expr )
         return expr
@@ -275,9 +276,10 @@
     security.declarePrivate( 'setActionExpression' )
     def setActionExpression(self, action):
         if action and isinstance(action, basestring):
-            if not action.startswith('string:') and not action.startswith('python:'):
+            if ( not action.startswith('string:')
+                 and not action.startswith('python:') ):
                 action = 'string:${object_url}/%s' % action
-                action = Expression( action )
+            action = Expression( action )
         self.action = action
 
     security.declarePublic( 'getCondition' )



More information about the CMF-checkins mailing list