From 8f618c92eaee5f6e70160febbb70ba4397e8f41b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaroslav=20=C5=A0karvada?= Date: Thu, 4 Jun 2015 15:36:28 +0200 Subject: [PATCH] tuned-adm: fixed 'tuned-adm off' traceback if tuned is not running MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jaroslav Škarvada --- tuned/admin/admin.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tuned/admin/admin.py b/tuned/admin/admin.py index 142ef32..cdb0983 100644 --- a/tuned/admin/admin.py +++ b/tuned/admin/admin.py @@ -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