diff options
author | Andy McCurdy <andy@andymccurdy.com> | 2019-10-01 14:21:03 -0700 |
---|---|---|
committer | Andy McCurdy <andy@andymccurdy.com> | 2019-12-28 22:23:43 -0800 |
commit | ce81df2272aa6a5d5f7044de7f0c5097d89e4686 (patch) | |
tree | 64b7439180221c2dec986c2d70c7a40f5dd67075 | |
parent | b09f1ce4e3ee1d32ac9df902749793274349bcc2 (diff) | |
download | redis-py-ce81df2272aa6a5d5f7044de7f0c5097d89e4686.tar.gz |
If a username is specified, make sure there's also a password
The password can be an empty string if `nopass` is specified.
-rwxr-xr-x | redis/connection.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/redis/connection.py b/redis/connection.py index 695a662..b90cafe 100755 --- a/redis/connection.py +++ b/redis/connection.py @@ -617,7 +617,7 @@ class Connection(object): # if username and/or password are set, authenticate if self.username or self.password: if self.username: - auth_args = (self.username, self.password) + auth_args = (self.username, self.password or '') else: auth_args = (self.password,) # avoid checking health here -- PING will fail if we try |