[ZCM] [ZC] 1883/ 1 Request "Two Unauthorized exceptions, why?"
Collector: Zope Bugs, Features,
and Patches ...
zope-coders-admin at zope.org
Wed Aug 31 17:50:13 EDT 2005
Issue #1883 Update (Request) "Two Unauthorized exceptions, why?"
Status Pending, Zope/bug medium
To followup, visit:
http://www.zope.org/Collectors/Zope/1883
==============================================================
= Request - Entry #1 by jens on Aug 31, 2005 5:50 pm
There are two exception classes called Unauthorized defined in Zope: zExceptions.Unauthorized and AccessControl.Unauthorized. The version in AccessControl subclasses from the zExceptions code and overrides one method (getValueName), whereby both implementations attempt to do the same thing slightly differently.
The problem is that both classes are used in Zope without any rhyme or reason, and if you have an except clause you cannot catch zExceptions.Unauthorized by looking for AccessControl.Unauthorized, leading to much head-scratching.
I don't know what the rationale is to override getValueName in AccessControl.Unauthorized (the overridden implementation seems better than the one in zExceptions.Unauthorized), but it seems that AccessControl/unauthorized.py should go away and AccessControl/__init__.py should merely import zExceptions.Unauthorized for backwards compatibility.
==============================================================
More information about the Zope-Collector-Monitor
mailing list