summaryrefslogtreecommitdiff
path: root/redis/sentinel.py
diff options
context:
space:
mode:
authorJon Dufresne <jon.dufresne@gmail.com>2017-11-02 06:30:07 -0700
committerJon Dufresne <jon.dufresne@gmail.com>2018-11-03 03:21:49 -0700
commitd05afabcc038764d4edfe5040c4ce783da691724 (patch)
tree9ab1bc81249b8d7ed267e9b149cafe566bad7df7 /redis/sentinel.py
parentac5611c0549942f16e4261ca9895e67832bd7285 (diff)
downloadredis-py-d05afabcc038764d4edfe5040c4ce783da691724.tar.gz
Pass generators to dict() instead of coercing to a list
Diffstat (limited to 'redis/sentinel.py')
-rw-r--r--redis/sentinel.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/redis/sentinel.py b/redis/sentinel.py
index 518fec5..c4ff892 100644
--- a/redis/sentinel.py
+++ b/redis/sentinel.py
@@ -171,10 +171,10 @@ class Sentinel(object):
# if sentinel_kwargs isn't defined, use the socket_* options from
# connection_kwargs
if sentinel_kwargs is None:
- sentinel_kwargs = dict([(k, v)
+ sentinel_kwargs = dict((k, v)
for k, v in iteritems(connection_kwargs)
if k.startswith('socket_')
- ])
+ )
self.sentinel_kwargs = sentinel_kwargs
self.sentinels = [StrictRedis(hostname, port, **self.sentinel_kwargs)