redis_return: cluster_mode default to False in __virtual__ to prevent KeyError stacktraces

This commit is contained in:
Ronald van Zantvoort 2018-04-26 15:10:32 +02:00
parent 71e3286829
commit c90f83b0f9
No known key found for this signature in database
GPG key ID: D3DE53B7EFF75061

View file

@ -124,7 +124,7 @@ def __virtual__():
if not HAS_REDIS:
return False, 'Could not import redis returner; ' \
'redis python client is not installed.'
if not HAS_REDIS_CLUSTER and _get_options()['cluster_mode']:
if not HAS_REDIS_CLUSTER and _get_options().get('cluster_mode', False):
return (False, "Please install the redis-py-cluster package.")
return __virtualname__