Merged from old philikon-aq-and-__parent__ branch:

Log message for revision 77024:
  Read that mail again, we agreed on raising an AttributeError instead of returning None.
parent eb8b5a8d
......@@ -179,6 +179,13 @@ class UnauthorizedBinding:
# Make *extra* sure that the wrapper isn't used to access
# __call__, etc.
if name.startswith('__'):
# Acquisition will nowadays try to do an getattr on all
# objects which aren't Acquisition wrappers, asking for a
# __parent__ pointer. We don't want to raise Unauthorized
# in this case but simply an AttributeError.
if name in ('__parent__', '__name__'):
raise AttributeError(name)
self.__you_lose()
return guarded_getattr(self._wrapped, name, default)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment