tuned-adm: fixed 'tuned-adm off' traceback if tuned is not running
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
This commit is contained in:
parent
df1183bf03
commit
8f618c92ea
1 changed files with 5 additions and 1 deletions
|
|
@ -105,7 +105,11 @@ class Admin(object):
|
|||
return ret
|
||||
|
||||
def off(self):
|
||||
result = self._controller.off()
|
||||
try:
|
||||
result = self._controller.off()
|
||||
except TunedAdminDBusException as e:
|
||||
self._error(e)
|
||||
return False
|
||||
if not result:
|
||||
self._error("Cannot disable active profile.")
|
||||
return result
|
||||
|
|
|
|||
Loading…
Reference in a new issue