diff options
author | Kamyab Taghizadeh <kamyab.zad@gmail.com> | 2022-04-28 04:06:05 +0430 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-28 02:36:05 +0300 |
commit | cfebc0fa9c4f7e4ef141729959cd149861cfd706 (patch) | |
tree | 535b63b5538df5b221b86c4b2aac93a8ac91eff4 /redis/commands/core.py | |
parent | 1f046ac23502521dad280a49ff31263b2e92f4b3 (diff) | |
download | redis-py-cfebc0fa9c4f7e4ef141729959cd149861cfd706.tar.gz |
Fix incorrect return statement in auth (#2086) (#2092)
Diffstat (limited to 'redis/commands/core.py')
-rw-r--r-- | redis/commands/core.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/redis/commands/core.py b/redis/commands/core.py index fd6ad46..30102eb 100644 --- a/redis/commands/core.py +++ b/redis/commands/core.py @@ -376,9 +376,11 @@ class ManagementCommands(CommandsProtocol): authenticate for the given user. For more information see https://redis.io/commands/auth """ - if username: - return self.execute_command("AUTH", username, password, **kwargs) - return self.execute_command + pieces = [] + if username is not None: + pieces.append(username) + pieces.append(password) + return self.execute_command("AUTH", *pieces, **kwargs) def bgrewriteaof(self, **kwargs): """Tell the Redis server to rewrite the AOF file from data in memory. |