server/sources/native.py
changeset 7536 29961a416faa
parent 7514 32081892850e
parent 7530 15178bf89fb6
child 7543 570522300e22
--- a/server/sources/native.py	Fri Jun 17 18:50:13 2011 +0200
+++ b/server/sources/native.py	Fri Jun 17 18:53:33 2011 +0200
@@ -165,6 +165,15 @@
 class UndoException(Exception):
     """something went wrong during undoing"""
 
+    def __unicode__(self):
+        """Called by the unicode builtin; should return a Unicode object
+
+        Type of UndoException message must be `unicode` by design in CubicWeb.
+
+        .. warning::
+            This method is not available in python2.5"""
+        assert isinstance(self.message, unicode)
+        return self.message
 
 def _undo_check_relation_target(tentity, rdef, role):
     """check linked entity has not been redirected for this relation"""