[Zope-Checkins] CVS: Packages/ZPublisher -
BaseRequest.py:1.51.2.2.10.2
Sidnei da Silva
sidnei at awkly.org
Wed Oct 6 15:03:41 EDT 2004
Update of /cvs-repository/Packages/ZPublisher
In directory cvs.zope.org:/tmp/cvs-serv27768/lib/python/ZPublisher
Modified Files:
Tag: dc-bobo_traverse-branch
BaseRequest.py
Log Message:
Remove fallback on __bobo_traverse__ failure, as discussed with Chris McDonough.
=== Packages/ZPublisher/BaseRequest.py 1.51.2.2.10.1 => 1.51.2.2.10.2 ===
--- Packages/ZPublisher/BaseRequest.py:1.51.2.2.10.1 Mon Oct 4 16:29:44 2004
+++ Packages/ZPublisher/BaseRequest.py Wed Oct 6 15:03:09 2004
@@ -298,19 +298,20 @@
"Object name begins with an underscore at: %s" % URL)
else: return response.forbiddenError(entry_name)
- bobo_got = 0
- try:
- if hasattr(object,'__bobo_traverse__'):
+ if hasattr(object,'__bobo_traverse__'):
+ try:
subobject=object.__bobo_traverse__(request,entry_name)
- bobo_got = 1
if type(subobject) is type(()) and len(subobject) > 1:
# Add additional parents into the path
parents[-1:] = list(subobject[:-1])
object, subobject = subobject[-2:]
- except (AttributeError, KeyError):
- pass
-
- if not bobo_got:
+ except (AttributeError, KeyError):
+ if debug_mode:
+ return response.debugError(
+ "Cannot locate object at: %s" % URL)
+ else:
+ return response.notFoundError(URL)
+ else:
try:
# Note - no_acquire_flag is necessary to support
# things like DAV. We have to make sure
More information about the Zope-Checkins
mailing list