diff options
author | Jon Dufresne <jon.dufresne@gmail.com> | 2017-11-02 06:30:07 -0700 |
---|---|---|
committer | Jon Dufresne <jon.dufresne@gmail.com> | 2018-11-03 03:21:49 -0700 |
commit | d05afabcc038764d4edfe5040c4ce783da691724 (patch) | |
tree | 9ab1bc81249b8d7ed267e9b149cafe566bad7df7 /redis/sentinel.py | |
parent | ac5611c0549942f16e4261ca9895e67832bd7285 (diff) | |
download | redis-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.py | 4 |
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) |