summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Urban <hydrogen18@gmail.com>2013-10-19 18:38:33 -0400
committerEric Urban <hydrogen18@gmail.com>2013-10-19 18:38:33 -0400
commit200d80a1711b9fb88ed89912443aa2dd8794e61c (patch)
treef4b8939168c37a98b3828502cc390360b995be2e
parente9b327cd8aeb4efadd3d2dc49795a15270957dbd (diff)
downloadredis-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.py2
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