Skip to content

Commit 6c3c84d

Browse files
authored
Merge pull request #529 from splitio/feature/SemVer
Feature/sem ver
2 parents 0598835 + bd216bb commit 6c3c84d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

splitio/storage/pluggable.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -503,7 +503,7 @@ def segment_contains(self, segment_name, key):
503503
except Exception:
504504
_LOGGER.error('Error checking segment key')
505505
_LOGGER.debug('Error: ', exc_info=True)
506-
return None
506+
return False
507507

508508
def get_segment_keys_count(self):
509509
"""

splitio/storage/redis.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -388,11 +388,11 @@ def segment_contains(self, segment_name, key):
388388
try:
389389
res = self._redis.sismember(self._get_key(segment_name), key)
390390
_LOGGER.debug("Checking Segment [%s] contain key [%s] in redis: %s" % (segment_name, key, res))
391-
return res
391+
return bool(res)
392392
except RedisAdapterException:
393393
_LOGGER.error('Error testing members in segment stored in redis')
394394
_LOGGER.debug('Error: ', exc_info=True)
395-
return None
395+
return False
396396

397397
def get_segments_count(self):
398398
"""

0 commit comments

Comments
 (0)