[Checkins] SVN: Zope/branches/2.12/ Correctly handle unauthorized exceptions in the ZPublisherExceptionHook.
Wichert Akkerman
wichert at wiggy.net
Thu Jul 2 07:13:45 EDT 2009
On 7/2/09 11:43 AM, Hanno Schlichting wrote:
> 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 [1] says:
>
> isinstance(object, classinfo)
> Return true if the object argument is an instance of the classinfo
> argument, or of a (direct or indirect) subclass thereof.
That's fine, but looking at http://zope3.pov.lt/trac/changeset/101181
you did not use isinstance but 'is'.
Wichert.
More information about the Checkins
mailing list