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

Steve Alexander steve@cat-box.net
Mon, 17 Feb 2003 13:01:14 -0500


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

Modified Files:
	_zope_error.py unauthorized.py 
Log Message:
improved sourcecode formatting


=== Zope3/src/zope/exceptions/_zope_error.py 1.4 => 1.5 ===
--- Zope3/src/zope/exceptions/_zope_error.py:1.4	Tue Feb 11 11:00:06 2003
+++ Zope3/src/zope/exceptions/_zope_error.py	Mon Feb 17 13:01:13 2003
@@ -19,7 +19,7 @@
 from zope.interface.implements import implements
 
 class ZopeError(Exception):
-    """ Generic base class for Zope errors."""
+    """Generic base class for Zope errors."""
 
 class IZopeError(IException):
     pass


=== Zope3/src/zope/exceptions/unauthorized.py 1.4 => 1.5 ===
--- Zope3/src/zope/exceptions/unauthorized.py:1.4	Tue Feb 11 11:00:06 2003
+++ Zope3/src/zope/exceptions/unauthorized.py	Mon Feb 17 13:01:13 2003
@@ -40,21 +40,24 @@
         if name is None and (
             not isinstance(message, StringType) or len(message.split()) <= 1):
             # First arg is a name, not a message
-            name=message
-            message=None
+            name = message
+            message = None
 
-        self.name=name
-        self.message=message
-        self.value=value
+        self.name = name
+        self.message = message
+        self.value = value
 
         if kw:
-            if needed: needed.update(kw)
-            else: needed=kw
+            if needed:
+                needed.update(kw)
+            else:
+                needed = kw
 
-        self.needed=needed
+        self.needed = needed
 
     def __str__(self):
-        if self.message is not None: return self.message
+        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"
                     % self.name)
@@ -64,9 +67,10 @@
 
 
     def getValueName(self):
-        v=self.value
-        vname=getattr(v, '__name__', None)
-        if vname: return vname
+        v = self.value
+        vname = getattr(v, '__name__', None)
+        if vname:
+            return vname
         c = getattr(v, '__class__', type(v))
         c = getattr(c, '__name__', 'object')
         return "a particular %s" % c