[Zope-Checkins] CVS: Zope/lib/python/OFS - SimpleItem.py:1.98

Torped Strategy and Communications info@torped.se
Fri, 12 Apr 2002 13:30:23 -0400


Update of /cvs-repository/Zope/lib/python/OFS
In directory cvs.zope.org:/tmp/cvs-serv6024

Modified Files:
	SimpleItem.py 
Log Message:
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.


=== Zope/lib/python/OFS/SimpleItem.py 1.97 => 1.98 ===
                           '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)