Skip to content

Commit

Permalink
Merge pull request #177 from skoranda/better_pickling_redis_whoosh_store
Browse files Browse the repository at this point in the history
Prevent error when unpickling RedisWhooshStore from Redis
  • Loading branch information
leifj committed Aug 29, 2019
2 parents 8fe4d96 + ed84ef0 commit 22b7d8a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/pyff/store.py
Original file line number Diff line number Diff line change
Expand Up @@ -519,6 +519,7 @@ def __init__(self, *args, **kwargs):
self.reset()

def _setup(self):
self._redis = getattr(self, '_redis', None)
if not self._redis:
self._redis = redis() # XXX test cases won't get correctly unpicked because of this
self.schema = Schema(content=NGRAMWORDS(stored=False))
Expand Down

0 comments on commit 22b7d8a

Please sign in to comment.