Skip to content

Commit

Permalink
- Fix __getattr__ signature in UnauthorizedBinding (fixes #703)
Browse files Browse the repository at this point in the history
  • Loading branch information
dataflake committed Nov 3, 2019
1 parent e9178f1 commit 31303a6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ https://github.com/zopefoundation/Zope/blob/4.x/CHANGES.rst

5.0a1 (unreleased)
------------------
- Fix ``__getattr__`` signature in ``UnauthorizedBinding``
(`#703 <https://github.com/zopefoundation/Zope/issues/703>`_)

- Remove more Python 2 support code
(`#692 <https://github.com/zopefoundation/Zope/issues/692>`_)
Expand Down
4 changes: 2 additions & 2 deletions src/Shared/DC/Scripts/Bindings.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ def __init__(self, name, wrapped):
def __repr__(self):
return '<UnauthorizedBinding: %s>' % self._name

def __getattr__(self, name, default=None):
def __getattr__(self, name):
# Make *extra* sure that the wrapper isn't used to access
# __call__, etc.
if name.startswith('__'):
Expand All @@ -200,7 +200,7 @@ def __getattr__(self, name, default=None):

self.__you_lose()

return guarded_getattr(self._wrapped, name, default)
return guarded_getattr(self._wrapped, name)

def __you_lose(self):
name = self.__dict__['_name']
Expand Down

0 comments on commit 31303a6

Please sign in to comment.