Skip to content

Commit

Permalink
fix: expand variables in Plugin._verify_all_device_commands
Browse files Browse the repository at this point in the history
Need to expand variables before calling the @command function. This is
actually done for _execute_all[_non]_device_commands and
_verify_all_non_device_commands, but not in _verify_all_device_commands.
This adds the missing expansion.

Signed-off-by: Adriaan Schmidt <adriaan.schmidt@siemens.com>
  • Loading branch information
adriaan42 committed Sep 11, 2024
1 parent c082797 commit a7aa2ab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tuned/plugins/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ def _verify_all_non_device_commands(self, instance, ignore_missing):
def _verify_all_device_commands(self, instance, devices, ignore_missing):
ret = True
for command in [command for command in list(self._commands.values()) if command["per_device"]]:
new_value = instance.options.get(command["name"], None)
new_value = self._variables.expand(instance.options.get(command["name"], None))
if new_value is None:
continue
for device in devices:
Expand Down

0 comments on commit a7aa2ab

Please sign in to comment.