Commit 41df1460 authored by Lennart Regebro's avatar Lennart Regebro

Fix of issue #69: If standard_error_message is a method, it never gets called, because

isinstance will raise an Exception first. I now catch this exception.
parent 6f8756b3
......@@ -17,8 +17,8 @@ Aqueduct database adapters, etc.
This module can also be used as a simple template for implementing new
item types.
$Id: SimpleItem.py,v 1.97 2002/04/05 16:01:55 htrd Exp $'''
__version__='$Revision: 1.97 $'[11:-2]
$Id: SimpleItem.py,v 1.98 2002/04/12 17:30:22 Torped Exp $'''
__version__='$Revision: 1.98 $'[11:-2]
import re, sys, Globals, App.Management, Acquisition, App.Undo
import AccessControl.Role, AccessControl.Owned, App.Common
......@@ -201,7 +201,13 @@ class Item(Base, Resource, CopySource, App.Management.Tabs, Traversable,
'error_tb': error_tb,
'error_traceback': error_tb,
'error_message': error_message}
if isinstance(s, HTML):
try:
_isinstance=isinstance(s, HTML)
except TypeError:
_isinstance=None
if _isinstance:
v = s(client, REQUEST, **kwargs)
elif callable(s):
v = s(**kwargs)
......
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