From cfebc0fa9c4f7e4ef141729959cd149861cfd706 Mon Sep 17 00:00:00 2001 From: Kamyab Taghizadeh Date: Thu, 28 Apr 2022 04:06:05 +0430 Subject: Fix incorrect return statement in auth (#2086) (#2092) --- redis/commands/core.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'redis/commands/core.py') 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. -- cgit v1.2.1