[Zope-Checkins] CVS: Zope3/lib/python/Zope/Publisher - DefaultPublication.py:1.1.2.8
Shane Hathaway
shane@digicool.com
Mon, 7 Jan 2002 10:40:42 -0500
Update of /cvs-repository/Zope3/lib/python/Zope/Publisher
In directory cvs.zope.org:/tmp/cvs-serv577
Modified Files:
Tag: Zope-3x-branch
DefaultPublication.py
Log Message:
- Added a require_docstrings flag.
- handleException() doesn't need to return anything anymore.
=== Zope3/lib/python/Zope/Publisher/DefaultPublication.py 1.1.2.7 => 1.1.2.8 ===
__implements__ = IPublication
+ require_docstrings = 1
+
def __init__(self, app):
self.app = app
@@ -38,7 +40,7 @@
except (KeyError, IndexError,
TypeError, AttributeError):
raise NotFound(ob, name, request)
- if not getattr(subob, '__doc__', None):
+ if self.require_docstrings and not getattr(subob, '__doc__', None):
raise DebugError(subob, 'Missing or empty doc string at: %s' %
request.getURL())
return subob
@@ -59,5 +61,4 @@
# Let the response handle it as best it can.
response = request.response
response.handleException(exc_info)
- return response