From 0a1205313d9c633ce8239ce6774ce2fcedc26d48 Mon Sep 17 00:00:00 2001 From: Gene Ruebsamen Date: Wed, 26 Apr 2023 14:56:03 -0700 Subject: [PATCH] Fix the remaining issues in the command execution pipeline (#130) --- Commands.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Commands.py b/Commands.py index 028dac034a5c..1b007c55170e 100644 --- a/Commands.py +++ b/Commands.py @@ -68,7 +68,7 @@ def load_commands(self): params = self.get_command_params(command_function) # Store the module along with the function name commands.append( - (command_name, module, command_function.__name__, params) + (command_name, getattr(module, module_name), command_function.__name__, params) ) # Return the commands list return commands @@ -85,7 +85,7 @@ def get_command_params(self, func): def find_command(self, command_name: str): for name, module, function_name, params in self.commands: - if name == command_name: + if function_name == command_name: command_function = getattr(module, function_name) return command_function, params return None, None @@ -102,5 +102,5 @@ def execute_command(self, command_name: str, command_args: dict): for name, value in command_args.items(): if name in params: params[name] = value - output = command_function(**params) + output = command_function(self,**params) return output