Skip to content

Commit

Permalink
quoting the unauthorized component makes the exception
Browse files Browse the repository at this point in the history
a bit more readable
  • Loading branch information
zopyx committed Feb 24, 2003
1 parent 2d672ae commit 7203dae
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions unauthorized.py
Expand Up @@ -11,7 +11,7 @@
#
##############################################################################
"""
$Id: unauthorized.py,v 1.7 2002/09/24 22:05:40 jeremy Exp $
$Id: unauthorized.py,v 1.8 2003/02/24 16:57:36 andreasjung Exp $
"""

from types import StringType
Expand Down Expand Up @@ -52,10 +52,10 @@ def __init__(self, message=None, value=None, needed=None, name=None, **kw):
def __str__(self):
if self.message is not None: return self.message
if self.name is not None:
return ("You are not allowed to access %s in this context"
return ("You are not allowed to access '%s' in this context"
% self.name)
elif self.value is not None:
return ("You are not allowed to access %s in this context"
return ("You are not allowed to access 's' in this context"
% self.getValueName())
return repr(self)

Expand Down

0 comments on commit 7203dae

Please sign in to comment.