[Checkins] SVN: Products.DCWorkflow/branches/2.2/Products/DCWorkflow/ Backport r124571 from trunk.

Tres Seaver cvs-admin at zope.org
Sun Mar 11 18:04:18 UTC 2012


Log message for revision 124573:
  Backport r124571 from trunk.

Changed:
  U   Products.DCWorkflow/branches/2.2/Products/DCWorkflow/ContainerTab.py
  U   Products.DCWorkflow/branches/2.2/Products/DCWorkflow/Variables.py

-=-
Modified: Products.DCWorkflow/branches/2.2/Products/DCWorkflow/ContainerTab.py
===================================================================
--- Products.DCWorkflow/branches/2.2/Products/DCWorkflow/ContainerTab.py	2012-03-11 17:49:09 UTC (rev 124572)
+++ Products.DCWorkflow/branches/2.2/Products/DCWorkflow/ContainerTab.py	2012-03-11 18:04:15 UTC (rev 124573)
@@ -19,6 +19,7 @@
 from Acquisition import aq_inner
 from Acquisition import aq_parent
 from OFS.Folder import Folder
+from zExceptions import BadRequest
 
 _marker = []  # Create a new marker object.
 
@@ -53,7 +54,7 @@
     def _checkId(self, id, allow_dup=0):
         if not allow_dup:
             if self._mapping.has_key(id):
-                raise 'Bad Request', 'The id "%s" is already in use.' % id
+                raise BadRequest('The id "%s" is already in use.' % id)
         return Folder._checkId(self, id, allow_dup)
 
     def _getOb(self, name, default=_marker):
@@ -111,7 +112,7 @@
     def manage_renameObjects(self, ids=[], new_ids=[], REQUEST=None):
         """Rename several sub-objects"""
         if len(ids) != len(new_ids):
-            raise 'Bad Request', 'Please rename each listed object.'
+            raise BadRequest('Please rename each listed object.')
         for i in range(len(ids)):
             if ids[i] != new_ids[i]:
                 self.manage_renameObject(ids[i], new_ids[i])

Modified: Products.DCWorkflow/branches/2.2/Products/DCWorkflow/Variables.py
===================================================================
--- Products.DCWorkflow/branches/2.2/Products/DCWorkflow/Variables.py	2012-03-11 17:49:09 UTC (rev 124572)
+++ Products.DCWorkflow/branches/2.2/Products/DCWorkflow/Variables.py	2012-03-11 18:04:15 UTC (rev 124573)
@@ -21,6 +21,7 @@
 from App.class_init import InitializeClass
 from App.special_dtml import DTMLFile
 from OFS.SimpleItem import SimpleItem
+from zExceptions import BadRequest
 
 from Products.CMFCore.Expression import Expression
 from Products.DCWorkflow.ContainerTab import ContainerTab
@@ -148,7 +149,7 @@
     def _checkId(self, id, allow_dup=0):
         wf_def = aq_parent(aq_inner(self))
         if id == wf_def.state_var:
-            raise 'Bad Request', '"%s" is used for keeping state.' % id
+            raise BadRequest('"%s" is used for keeping state.' % id)
         return ContainerTab._checkId(self, id, allow_dup)
 
     def getStateVar(self):



More information about the checkins mailing list