Commit a117a18d authored by Jim Fulton's avatar Jim Fulton

Fix bug handling not found errors.

parent 69e2726e
...@@ -149,6 +149,7 @@ def zpublisher_exception_hook( ...@@ -149,6 +149,7 @@ def zpublisher_exception_hook(
StringType=type(''), StringType=type(''),
lower=string.lower, lower=string.lower,
ConflictError=ZODB.POSException.ConflictError, ConflictError=ZODB.POSException.ConflictError,
ListType=type([]),
): ):
try: try:
if type(t) is StringType and lower(t) in ('unauthorized', 'redirect'): if type(t) is StringType and lower(t) in ('unauthorized', 'redirect'):
...@@ -160,7 +161,8 @@ def zpublisher_exception_hook( ...@@ -160,7 +161,8 @@ def zpublisher_exception_hook(
if (getattr(REQUEST.get('RESPONSE', None), '_error_format', '') if (getattr(REQUEST.get('RESPONSE', None), '_error_format', '')
!='text/html'): raise !='text/html'): raise
if published is None or published is app: if (published is None or published is app or
type(published) is ListType):
# At least get the top-lebel object # At least get the top-lebel object
published=app.__bobo_traverse__(REQUEST).__of__( published=app.__bobo_traverse__(REQUEST).__of__(
RequestContainer(REQUEST)) RequestContainer(REQUEST))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment