Skip to content

Commit 65c4334

Browse files
Simplify MODULE LOAD and fix SCRIPT FLUSH doc (#1597)
1 parent 86b8976 commit 65c4334

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

redis/commands.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2861,7 +2861,7 @@ def script_flush(self, sync_type="SYNC"):
28612861
See: https://redis.io/commands/script-flush
28622862
"""
28632863
if sync_type not in ["SYNC", "ASYNC"]:
2864-
raise DataError("SCRIPT FLUSH defaults to SYNC or"
2864+
raise DataError("SCRIPT FLUSH defaults to SYNC or "
28652865
"accepts SYNC/ASYNC")
28662866
pieces = [sync_type]
28672867
return self.execute_command('SCRIPT FLUSH', *pieces)
@@ -3155,9 +3155,7 @@ def module_load(self, path, *args):
31553155
Passes all ``*args`` to the module, during loading.
31563156
Raises ``ModuleError`` if a module is not found at ``path``.
31573157
"""
3158-
pieces = list(args)
3159-
pieces.insert(0, path)
3160-
return self.execute_command('MODULE LOAD', *pieces)
3158+
return self.execute_command('MODULE LOAD', path, *args)
31613159

31623160
def module_unload(self, name):
31633161
"""

0 commit comments

Comments
 (0)