1
0
Fork 0

Fix Traceback on reload when the preset profile does not exist

The reload_profile_config() method can pass through a TunedException
when the requested profile does not exist, or is invalid. We need to
catch it and log the error.

Resolves: rhbz#1774645
Resolves: rhbz#1702724

Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
This commit is contained in:
Ondřej Lysoněk 2019-11-26 15:49:39 +01:00
parent 668e8fec7d
commit c044822aff

View file

@ -138,7 +138,11 @@ class Controller(tuned.exports.interfaces.ExportableInterface):
stop_ok = self.stop()
if not stop_ok:
return False
self._daemon.reload_profile_config()
try:
self._daemon.reload_profile_config()
except TunedException as e:
log.error("Failed to reload Tuned: %s" % e)
return False
return self.start()
def _switch_profile(self, profile_name, manual):