From 4a499a9d13b856675071ea2c101426d7aacba310 Mon Sep 17 00:00:00 2001 From: Kien Date: Tue, 25 Dec 2018 18:40:42 +0700 Subject: [PATCH] fix issue when having ssl=False --- rediscluster/client.py | 2 +- rediscluster/connection.py | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/rediscluster/client.py b/rediscluster/client.py index 773c1cfd..30b66ade 100644 --- a/rediscluster/client.py +++ b/rediscluster/client.py @@ -161,7 +161,7 @@ def __init__(self, host=None, port=None, startup_nodes=None, max_connections=Non if "db" in kwargs: raise RedisClusterException("Argument 'db' is not possible to use in cluster mode") - if kwargs.get('ssl', False): + if kwargs.pop('ssl', False): # Needs to be removed to avoid exception in redis Connection init connection_class = SSLClusterConnection if "connection_pool" in kwargs: diff --git a/rediscluster/connection.py b/rediscluster/connection.py index 4a773486..e6ea74f3 100644 --- a/rediscluster/connection.py +++ b/rediscluster/connection.py @@ -71,7 +71,6 @@ class SSLClusterConnection(SSLConnection): def __init__(self, **kwargs): self.readonly = kwargs.pop('readonly', False) kwargs['parser_class'] = ClusterParser - kwargs.pop('ssl', None) # Needs to be removed to avoid exception in redis Connection init super(SSLClusterConnection, self).__init__(**kwargs) def on_connect(self):