[Zope-Checkins] CVS: Zope/lib/python/zExceptions - ExceptionFormatter.py:1.4 ITracebackSupplement.py:1.3 __init__.py:1.4 unauthorized.py:1.5
Martijn Pieters
mj@zope.com
Wed, 14 Aug 2002 18:12:07 -0400
Update of /cvs-repository/Zope/lib/python/zExceptions
In directory cvs.zope.org:/tmp/cvs-serv21464
Modified Files:
ExceptionFormatter.py ITracebackSupplement.py __init__.py
unauthorized.py
Log Message:
Clean up indentation and trailing whitespace.
=== Zope/lib/python/zExceptions/ExceptionFormatter.py 1.3 => 1.4 ===
--- Zope/lib/python/zExceptions/ExceptionFormatter.py:1.3 Mon Apr 8 08:41:52 2002
+++ Zope/lib/python/zExceptions/ExceptionFormatter.py Wed Aug 14 18:12:06 2002
@@ -2,14 +2,14 @@
#
# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
# All Rights Reserved.
-#
+#
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
-#
+#
##############################################################################
"""An exception formatter that shows traceback supplements and traceback info,
optionally in HTML.
@@ -113,7 +113,7 @@
extra = getInfo()
if extra:
return extra
- return None
+ return None
def formatTracebackInfo(self, tbi):
return self.formatSupplementLine('__traceback_info__: %s' % (tbi,))
@@ -231,7 +231,7 @@
extra = getInfo(1)
if extra:
return extra
- return None
+ return None
@@ -250,4 +250,3 @@
else:
fmt = text_formatter
return fmt.formatException(t, v, tb, limit=limit)
-
=== Zope/lib/python/zExceptions/ITracebackSupplement.py 1.2 => 1.3 ===
--- Zope/lib/python/zExceptions/ITracebackSupplement.py:1.2 Wed Apr 3 15:44:00 2002
+++ Zope/lib/python/zExceptions/ITracebackSupplement.py Wed Aug 14 18:12:06 2002
@@ -2,14 +2,14 @@
#
# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
# All Rights Reserved.
-#
+#
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
-#
+#
##############################################################################
"""ITracebackSupplement interface definition.
=== Zope/lib/python/zExceptions/__init__.py 1.3 => 1.4 ===
--- Zope/lib/python/zExceptions/__init__.py:1.3 Wed Nov 28 10:51:23 2001
+++ Zope/lib/python/zExceptions/__init__.py Wed Aug 14 18:12:06 2002
@@ -1,14 +1,14 @@
##############################################################################
#
# Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved.
-#
+#
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE
-#
+#
##############################################################################
"""General exceptions that wish they were standard exceptions
=== Zope/lib/python/zExceptions/unauthorized.py 1.4 => 1.5 ===
--- Zope/lib/python/zExceptions/unauthorized.py:1.4 Wed Nov 28 10:51:23 2001
+++ Zope/lib/python/zExceptions/unauthorized.py Wed Aug 14 18:12:06 2002
@@ -1,14 +1,14 @@
##############################################################################
#
# Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved.
-#
+#
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE
-#
+#
##############################################################################
"""
$Id$
@@ -28,7 +28,7 @@
Unauthorized(name, value)
Unauthorized(name, value, needed)
Unauthorized(message, value, needed, name)
-
+
Where needed is a mapping objects with items represnting requirements
(e.g. {'permission': 'add spam'}). Any extra keyword arguments
provides are added to needed.
@@ -38,7 +38,7 @@
# First arg is a name, not a message
name=message
message=None
-
+
self.name=name
self.message=message
self.value=value
@@ -46,7 +46,7 @@
if kw:
if needed: needed.update(kw)
else: needed=kw
-
+
self.needed=needed
def __str__(self):
@@ -57,8 +57,8 @@
elif self.value is not None:
return ("You are not allowed to access %s in this context"
% self.getValueName(self.value))
-
-
+
+
def getValueName(self):
v=self.value
vname=getattr(v, '__name__', None)
@@ -66,4 +66,3 @@
c = getattr(v, '__class__', type(v))
c = getattr(c, '__name__', 'object')
return "a particular %s" % c
-