Skip to content
This repository has been archived by the owner on Feb 20, 2019. It is now read-only.

Commit

Permalink
Fix infinite recursion when unpickling a mapping type instance
Browse files Browse the repository at this point in the history
  • Loading branch information
Bert Vanderbauwhede committed Sep 18, 2014
1 parent 3b800a8 commit b3e8377
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions elasticutils/__init__.py
Expand Up @@ -2070,6 +2070,11 @@ def __getattr__(self, name):
# subclasses.
return self.get_object()

if name == '_results_dict':
# Prevent infinite recursion when unpickling a
# mapping type instance.
raise AttributeError(name)

# If that doesn't exist, then check the results_dict.
if name in self._results_dict:
return self._results_dict[name]
Expand Down

0 comments on commit b3e8377

Please sign in to comment.