Skip to content

Commit 0a12053

Browse files
authored
Fix the remaining issues in the command execution pipeline (#130)
1 parent 40d6463 commit 0a12053

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Commands.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ def load_commands(self):
6868
params = self.get_command_params(command_function)
6969
# Store the module along with the function name
7070
commands.append(
71-
(command_name, module, command_function.__name__, params)
71+
(command_name, getattr(module, module_name), command_function.__name__, params)
7272
)
7373
# Return the commands list
7474
return commands
@@ -85,7 +85,7 @@ def get_command_params(self, func):
8585

8686
def find_command(self, command_name: str):
8787
for name, module, function_name, params in self.commands:
88-
if name == command_name:
88+
if function_name == command_name:
8989
command_function = getattr(module, function_name)
9090
return command_function, params
9191
return None, None
@@ -102,5 +102,5 @@ def execute_command(self, command_name: str, command_args: dict):
102102
for name, value in command_args.items():
103103
if name in params:
104104
params[name] = value
105-
output = command_function(**params)
105+
output = command_function(self,**params)
106106
return output

0 commit comments

Comments
 (0)