From 906b911455f781fe1c2df41fafd4c6618d2d1bc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaroslav=20=C5=A0karvada?= Date: Mon, 17 Oct 2016 16:13:56 +0200 Subject: [PATCH] tuned-adm: fixed traceback if non-existent profile is queried through profile_info MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Resolves: rhbz#1385145 Signed-off-by: Jaroslav Škarvada --- tuned/admin/admin.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tuned/admin/admin.py b/tuned/admin/admin.py index e5701ed..0fb6ab6 100644 --- a/tuned/admin/admin.py +++ b/tuned/admin/admin.py @@ -117,7 +117,7 @@ class Admin(object): profile_name = None return profile_name - def _print_profile_info(self, profile_info): + def _print_profile_info(self, profile, profile_info): if profile_info[0] == True: print("Profile name:") print(profile_info[1]) @@ -135,12 +135,12 @@ class Admin(object): def _action_dbus_profile_info(self, profile = ""): if profile == "": profile = self._dbus_get_active_profile() - return self._controller.exit(self._print_profile_info(self._controller.profile_info(profile))) + return self._controller.exit(self._print_profile_info(profile, self._controller.profile_info(profile))) def _action_profile_info(self, profile = ""): if profile == "": profile = self._get_active_profile() - return self._print_profile_info(self._profiles_locator.get_profile_attrs(profile, [consts.PROFILE_ATTR_SUMMARY, consts.PROFILE_ATTR_DESCRIPTION], ["", ""])) + return self._print_profile_info(profile, self._profiles_locator.get_profile_attrs(profile, [consts.PROFILE_ATTR_SUMMARY, consts.PROFILE_ATTR_DESCRIPTION], ["", ""])) def _print_profile_name(self, profile_name): if profile_name is None: