diff --git a/tuned/plugins/base.py b/tuned/plugins/base.py index 6c2eb33..a29683f 100644 --- a/tuned/plugins/base.py +++ b/tuned/plugins/base.py @@ -127,7 +127,8 @@ class Plugin(object): if not command["per_device"]: storage_key = self._storage_key(command_name) old_value = self._storage.get(storage_key) - command["set"](old_value) + if old_value: + command["set"](old_value) self._storage.unset(storage_key) return @@ -137,7 +138,8 @@ class Plugin(object): for device in self._devices: storage_key = self._storage_key(command_name, device) old_value = self._storage.get(storage_key) - command["set"](old_value, device) + if old_value: + command["set"](old_value, device) self._storage.unset(storage_key) def execute_commands(self):