Skip to content

Commit

Permalink
Merge pull request #99 from thieman/tnt/store-all-none-return
Browse files Browse the repository at this point in the history
Handle None return from feature store .all()
  • Loading branch information
eli-darkly authored Sep 24, 2018
2 parents 8af3645 + bbc62cf commit 26d5005
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ldclient/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,8 @@ def all_flags_state(self, user, **kwargs):
with_reasons = kwargs.get('with_reasons', False)
try:
flags_map = self._store.all(FEATURES, lambda x: x)
if flags_map is None:
raise ValueError("feature store error")
except Exception as e:
log.error("Unable to read flags for all_flag_state: %s" % e)
return FeatureFlagsState(False)
Expand Down

0 comments on commit 26d5005

Please sign in to comment.