From f4850a7e423cdf2204a6468605670a89b1c057f3 Mon Sep 17 00:00:00 2001 From: Jan Vcelak Date: Fri, 11 May 2012 10:34:47 +0200 Subject: [PATCH] cleanup commands before commands application --- tuned/plugins/base.py | 3 --- tuned/plugins/repository.py | 1 + 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/tuned/plugins/base.py b/tuned/plugins/base.py index 80ea41e..afa8f34 100644 --- a/tuned/plugins/base.py +++ b/tuned/plugins/base.py @@ -115,9 +115,6 @@ class Plugin(object): new_value = self._options[command_name] - # FIXME: should we revert old settings before applying the new one? - # can we call cleanup_commands() instead - # TODO: refactor if command["per_device"]: for device in self._devices: diff --git a/tuned/plugins/repository.py b/tuned/plugins/repository.py index fb20da9..2452de4 100644 --- a/tuned/plugins/repository.py +++ b/tuned/plugins/repository.py @@ -45,6 +45,7 @@ class PluginRepository(tuned.patterns.Singleton): continue log.debug("running static tuning for plugin %s" % plugin) + plugin.cleanup_commands() plugin.execute_commands() def delete(self, plugin):