[Zope-Checkins] [Checkins] SVN: Zope/branches/2.12/ Correctly handle unauthorized exceptions in the ZPublisherExceptionHook.
hanno at hannosch.eu
Thu Jul 2 05:43:13 EDT 2009
On Thu, Jul 2, 2009 at 9:51 AM, David Glick<davidglick at onenw.org> wrote:
> I think you need issubclass(t, Unauthorized) here, as it could be the
> Unauthorized from AccessControl.unauthorized which is a subclass of the one
> from zExceptions.
The definition  says:
Return true if the object argument is an instance of the classinfo
argument, or of a (direct or indirect) subclass thereof.
and a short interpreter session confirms:
>>> class A():
>>> class B(A):
>>> a = A()
>>> b = B()
>>> isinstance(a, A)
>>> isinstance(a, B)
>>> isinstance(b, A)
>>> isinstance(b, B)
More information about the Zope-Checkins