Skip to content

Commit

Permalink
FIX-modin-project#2254: Fixed AttributeError not being thrown from ge…
Browse files Browse the repository at this point in the history
…tattr

Signed-off-by: Gregory Shimansky <gregory.shimansky@intel.com>
  • Loading branch information
gshimansky committed Nov 10, 2020
1 parent 90efde0 commit f0c6300
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion modin/pandas/groupby.py
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,9 @@ def _reconstruct_func(func, **kwargs):
**kwargs,
)
elif isinstance(func, str):
agg_func = getattr(self, func, None)
# Using "getattr" here masks possible AttributeError which we throw
# in __getattr__, so we should call __getattr__ directly instead.
agg_func = self.__getattr__(func)
if callable(agg_func):
return agg_func(*args, **kwargs)

Expand Down

0 comments on commit f0c6300

Please sign in to comment.