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:
parent
668e8fec7d
commit
c044822aff
1 changed files with 5 additions and 1 deletions
|
|
@ -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):
|
||||
|
|
|
|||
Loading…
Reference in a new issue