[Checkins] SVN: Products.CMFCore/trunk/Products/CMFCore/utils.py - don't raise string exceptions

Yvo Schubbe y.2010 at wcm-solutions.de
Tue Jul 27 07:55:39 EDT 2010


Log message for revision 115120:
  - don't raise string exceptions

Changed:
  UU  Products.CMFCore/trunk/Products/CMFCore/utils.py

-=-
Modified: Products.CMFCore/trunk/Products/CMFCore/utils.py
===================================================================
--- Products.CMFCore/trunk/Products/CMFCore/utils.py	2010-07-27 11:54:56 UTC (rev 115119)
+++ Products.CMFCore/trunk/Products/CMFCore/utils.py	2010-07-27 11:55:39 UTC (rev 115120)
@@ -11,8 +11,6 @@
 #
 ##############################################################################
 """ Utility functions.
-
-$Id$
 """
 
 import re
@@ -481,16 +479,17 @@
 
     """ Base class for objects which cannot be renamed.
     """
-    def _setId(self, id):
 
+    def _setId(self, id):
         """ Never allow renaming!
         """
         if id != self.getId():
-            raise MessageDialog(
+            raise ValueError(MessageDialog(
                 title='Invalid Id',
                 message='Cannot change the id of this object',
-                action ='./manage_main',)
+                action='./manage_main'))
 
+
 class UniqueObject (ImmutableId):
 
     """ Base class for objects which cannot be "overridden" / shadowed.


Property changes on: Products.CMFCore/trunk/Products/CMFCore/utils.py
___________________________________________________________________
Deleted: svn:keywords
   - Author Date Id Revision



More information about the checkins mailing list