@@ -333,6 +333,16 @@ def bgsave(self, schedule=True, **kwargs):
333333 pieces .append ("SCHEDULE" )
334334 return self .execute_command ("BGSAVE" , * pieces , ** kwargs )
335335
336+ def role (self ):
337+ """
338+ Provide information on the role of a Redis instance in
339+ the context of replication, by returning if the instance
340+ is currently a master, slave, or sentinel.
341+
342+ For more information check https://redis.io/commands/role
343+ """
344+ return self .execute_command ("ROLE" )
345+
336346 def client_kill (self , address , ** kwargs ):
337347 """Disconnects the client at ``address`` (ip:port)
338348
@@ -864,11 +874,15 @@ def slowlog_get(self, num=None, **kwargs):
864874
865875 For more information check https://redis.io/commands/slowlog-get
866876 """
877+ from redis .client import NEVER_DECODE
878+
867879 args = ["SLOWLOG GET" ]
868880 if num is not None :
869881 args .append (num )
870882 decode_responses = self .get_connection_kwargs ().get ("decode_responses" , False )
871- return self .execute_command (* args , decode_responses = decode_responses , ** kwargs )
883+ if decode_responses is True :
884+ kwargs [NEVER_DECODE ] = []
885+ return self .execute_command (* args , ** kwargs )
872886
873887 def slowlog_len (self , ** kwargs ):
874888 """
0 commit comments