From 35f7a2fbd17e78c8fe844ecba2243a50a7a07b57 Mon Sep 17 00:00:00 2001 From: Andrew Chen Wang <60190294+Andrew-Chen-Wang@users.noreply.github.com> Date: Fri, 8 Oct 2021 10:47:54 -0400 Subject: [PATCH] Simplify MODULE LOAD and fix SCRIPT FLUSH doc --- redis/commands.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/redis/commands.py b/redis/commands.py index eb7cea54f6..e4e6344eb9 100644 --- a/redis/commands.py +++ b/redis/commands.py @@ -2842,7 +2842,7 @@ def script_flush(self, sync_type="SYNC"): 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) @@ -3136,9 +3136,7 @@ def module_load(self, path, *args): 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): """