diff --git a/tuned/plugins/base.py b/tuned/plugins/base.py index b12634e..3001cae 100644 --- a/tuned/plugins/base.py +++ b/tuned/plugins/base.py @@ -110,7 +110,8 @@ class Plugin(object): command["set"](new_value) return - assert self._devices is not None + if self._devices is None: + return for device in self._devices: current_value = command["get"](device) @@ -131,7 +132,8 @@ class Plugin(object): self._storage.unset(storage_key) return - assert self._devices is not None + if self._devices is None: + return for device in self._devices: storage_key = self._storage_key(command_name, device) diff --git a/tuned/plugins/plugin_script.py b/tuned/plugins/plugin_script.py index ce481a5..5ff44fe 100644 --- a/tuned/plugins/plugin_script.py +++ b/tuned/plugins/plugin_script.py @@ -1,7 +1,7 @@ import base import tuned.logs import os -from subprocess import Popen +from subprocess import Popen, PIPE log = tuned.logs.get()