[Zope-Checkins] SVN: Zope/trunk/src/zExceptions/unauthorized.py Suppress 2.6 deprecation warnings about 'message' attribute in exceptions.

Tres Seaver tseaver at palladion.com
Tue Mar 17 13:31:54 EDT 2009


Log message for revision 98210:
  Suppress 2.6 deprecation warnings about 'message' attribute in exceptions.

Changed:
  U   Zope/trunk/src/zExceptions/unauthorized.py

-=-
Modified: Zope/trunk/src/zExceptions/unauthorized.py
===================================================================
--- Zope/trunk/src/zExceptions/unauthorized.py	2009-03-17 17:30:59 UTC (rev 98209)
+++ Zope/trunk/src/zExceptions/unauthorized.py	2009-03-17 17:31:53 UTC (rev 98210)
@@ -23,6 +23,11 @@
     """
     implements(IUnauthorized)
 
+    def _get_message(self):
+        return self._message
+
+    message = property(_get_message,)
+
     def __init__(self, message=None, value=None, needed=None, name=None, **kw):
         """Possible signatures:
 
@@ -44,7 +49,7 @@
             message=None
 
         self.name=name
-        self.message=message
+        self._message=message
         self.value=value
 
         if kw:



More information about the Zope-Checkins mailing list