Skip to content

Commit

Permalink
aliasing: raise AttributeError on the parent when delagate has not attr
Browse files Browse the repository at this point in the history
  • Loading branch information
koreno committed Aug 27, 2020
1 parent 02ef492 commit fc7b443
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions easypy/aliasing.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ def __getattr__(self, attr):
raise AttributeError(attr)
try:
return getattr(self._aliased, attr)
except AttributeError:
raise AttributeError("'%s' object has no attribute '%s'" % (type(self).__name__, attr)) from None
except _RecursionError as e:
if type(e) is RuntimeError and str(e) != 'maximum recursion depth exceeded':
raise
Expand Down

0 comments on commit fc7b443

Please sign in to comment.