summaryrefslogtreecommitdiff
path: root/redis
diff options
context:
space:
mode:
authorAndrew Chen Wang <60190294+Andrew-Chen-Wang@users.noreply.github.com>2021-10-14 09:36:09 -0400
committerGitHub <noreply@github.com>2021-10-14 16:36:09 +0300
commit65c433407dc02aff90fc41f63ea46b372b374b9b (patch)
tree28e5311675a41e82eac66ae308b48437b66d4c7f /redis
parent86b89764781b2e898eb92aed6e33cbafcfd6157b (diff)
downloadredis-py-65c433407dc02aff90fc41f63ea46b372b374b9b.tar.gz
Simplify MODULE LOAD and fix SCRIPT FLUSH doc (#1597)
Diffstat (limited to 'redis')
-rw-r--r--redis/commands.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/redis/commands.py b/redis/commands.py
index 7bb6b50..e10238a 100644
--- a/redis/commands.py
+++ b/redis/commands.py
@@ -2861,7 +2861,7 @@ class Commands:
See: https://redis.io/commands/script-flush
"""
if sync_type not in ["SYNC", "ASYNC"]:
- raise DataError("SCRIPT FLUSH defaults to SYNC or"
+ raise DataError("SCRIPT FLUSH defaults to SYNC or "
"accepts SYNC/ASYNC")
pieces = [sync_type]
return self.execute_command('SCRIPT FLUSH', *pieces)
@@ -3155,9 +3155,7 @@ class Commands:
Passes all ``*args`` to the module, during loading.
Raises ``ModuleError`` if a module is not found at ``path``.
"""
- pieces = list(args)
- pieces.insert(0, path)
- return self.execute_command('MODULE LOAD', *pieces)
+ return self.execute_command('MODULE LOAD', path, *args)
def module_unload(self, name):
"""