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.
David

On Jun 20, 2009, at 5:00 PM, Hanno Schlichting wrote:

> Log message for revision 101181:
>  Correctly handle unauthorized exceptions in the  
> ZPublisherExceptionHook.
>
>
> Changed:
>  U   Zope/branches/2.12/doc/CHANGES.rst
>  U   Zope/branches/2.12/src/Zope2/App/startup.py
>
> -=-
> Modified: Zope/branches/2.12/doc/CHANGES.rst
> ===================================================================
> --- Zope/branches/2.12/doc/CHANGES.rst        2009-06-20 19:53:08 UTC (rev  
> 101180)
> +++ Zope/branches/2.12/doc/CHANGES.rst        2009-06-21 00:00:53 UTC (rev  
> 101181)
> @@ -16,7 +16,11 @@
>
>   * ZODB 3.9.0b2
>
> +Bugs Fixed
> +++++++++++
>
> +- Correctly handle unauthorized exceptions in the  
> ZPublisherExceptionHook.
> +
> Zope 2.12.0 b2 (2009/05/27)
> ---------------------------
>
>
> Modified: Zope/branches/2.12/src/Zope2/App/startup.py
> ===================================================================
> --- Zope/branches/2.12/src/Zope2/App/startup.py       2009-06-20 19:53:08  
> UTC (rev 101180)
> +++ Zope/branches/2.12/src/Zope2/App/startup.py       2009-06-21 00:00:53  
> UTC (rev 101181)
> @@ -24,6 +24,7 @@
> from time import asctime
> from types import StringType, ListType
> from zExceptions import Redirect
> +from zExceptions import Unauthorized
> from ZODB.POSException import ConflictError
> import transaction
> import AccessControl.User
> @@ -170,7 +171,7 @@
>                 if t.lower() in ('unauthorized', 'redirect'):
>                     raise
>             else:
> -                if t is SystemExit or t is Redirect:
> +                if t is SystemExit or t is Redirect or t is  
> Unauthorized:
>                     raise
>
>                 if issubclass(t, ConflictError):
>
> _______________________________________________
> Checkins mailing list
> check...@zope.org
> http://mail.zope.org/mailman/listinfo/checkins

David Glick
Web Developer
ONE/Northwest

New tools and strategies for engaging people in protecting the  
environment

http://www.onenw.org
davidgl...@onenw.org
work: (206) 286-1235 x32
mobile: (206) 679-3833

Subscribe to ONEList, our email newsletter!
Practical advice for effective online engagement
http://www.onenw.org/full_signup




_______________________________________________
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins

Reply via email to