diff options
author | Eric Urban <hydrogen18@gmail.com> | 2013-10-19 18:38:33 -0400 |
---|---|---|
committer | Eric Urban <hydrogen18@gmail.com> | 2013-10-19 18:38:33 -0400 |
commit | 200d80a1711b9fb88ed89912443aa2dd8794e61c (patch) | |
tree | f4b8939168c37a98b3828502cc390360b995be2e | |
parent | e9b327cd8aeb4efadd3d2dc49795a15270957dbd (diff) | |
download | redis-py-200d80a1711b9fb88ed89912443aa2dd8794e61c.tar.gz |
Update client.py
Check for `None` instead of relying on the truth value of whatever the user happens to pass in for `unix_socket_path`. I think it is preferable to blow up when passed something like `0` rather than silently making a TCP connection.
-rw-r--r-- | redis/client.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/redis/client.py b/redis/client.py index a97bac1..0f9cbe4 100644 --- a/redis/client.py +++ b/redis/client.py @@ -353,7 +353,7 @@ class StrictRedis(object): 'decode_responses': decode_responses, } # based on input, setup appropriate connection args - if unix_socket_path: + if unix_socket_path!=None: kwargs.update({ 'path': unix_socket_path, 'connection_class': UnixDomainSocketConnection |