From a7aa2ab4b911e7e5f0de8d38a34502ae85c83bca Mon Sep 17 00:00:00 2001 From: Adriaan Schmidt Date: Wed, 11 Sep 2024 09:42:50 +0200 Subject: [PATCH] fix: expand variables in Plugin._verify_all_device_commands 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 --- tuned/plugins/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tuned/plugins/base.py b/tuned/plugins/base.py index cd54aea5..878ee95f 100644 --- a/tuned/plugins/base.py +++ b/tuned/plugins/base.py @@ -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: