Skip to content

Commit

Permalink
Fix 3.9 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
nickzoic committed Aug 30, 2024
1 parent 0763d27 commit 9c50815
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion countess/core/parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -888,7 +888,11 @@ def __getattr__(self, name):
try:
return self.params[name]
except KeyError as exc:
raise AttributeError(name=name, obj=self) from exc
try:
raise AttributeError(name=name, obj=self) from exc
except TypeError: # pragma: no cover
# 3.9 doesn't have name and obj attributes
raise AttributeError() from exc

def __setattr__(self, name, value):
"""Intercepts attempts to set parameters to a value and turns them into parameter.set_value.
Expand Down

0 comments on commit 9c50815

Please sign in to comment.