[Zope3-checkins] CVS: Zope3/src/zope/exceptions - unauthorized.py:1.9.30.1

Sidnei da Silva sidnei at awkly.org
Wed Mar 3 15:17:58 EST 2004


Update of /cvs-repository/Zope3/src/zope/exceptions
In directory cvs.zope.org:/tmp/cvs-serv21085/exceptions

Modified Files:
      Tag: runyaga-sip-branch
	unauthorized.py 
Log Message:
A missing return, a value that was being set but not returned, pass object as the 'value' argument to Unauthorized.


=== Zope3/src/zope/exceptions/unauthorized.py 1.9 => 1.9.30.1 ===
--- Zope3/src/zope/exceptions/unauthorized.py:1.9	Tue Aug 12 15:14:50 2003
+++ Zope3/src/zope/exceptions/unauthorized.py	Wed Mar  3 15:17:20 2004
@@ -71,7 +71,7 @@
         elif self.value is not None:
             msg = _("You are not allowed to access ${name} in this context")
             msg.mapping = {'name': self.getValueName()}
-        return _("You are not authorized")
+        return msg
 
 
     def getValueName(self):
@@ -83,3 +83,4 @@
         c = getattr(c, '__name__', 'object')
         msg = _("a particular ${object}")
         msg.mapping = {'object': c}
+        return msg




More information about the Zope3-Checkins mailing list