File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -758,18 +758,18 @@ def command_list(
758
758
759
759
For more information see https://redis.io/commands/command-list/
760
760
"""
761
- pieces = ["FILTERBY" ]
761
+ pieces = []
762
762
if module is not None :
763
763
pieces .extend (["MODULE" , module ])
764
764
if category is not None :
765
765
pieces .extend (["ACLCAT" , category ])
766
766
if pattern is not None :
767
767
pieces .extend (["PATTERN" , pattern ])
768
768
769
- if len ( pieces ) > 1 :
770
- return self . execute_command ( "COMMAND LIST" , * pieces )
769
+ if pieces :
770
+ pieces . insert ( 0 , "FILTERBY" )
771
771
772
- return self .execute_command ("COMMAND LIST" )
772
+ return self .execute_command ("COMMAND LIST" , * pieces )
773
773
774
774
def command_getkeysandflags (self , * args : List [str ]) -> List [Union [str , List [str ]]]:
775
775
"""
You can’t perform that action at this time.
0 commit comments