tuned/tuned-2.7.1-profile_info-traceback-fix.patch
Jaroslav Škarvada d7603eda88 Fixed traceback when non-existent profile is queried through
tuned-adm profile_info
  Resolves: rhbz#1385145
2016-10-17 16:20:14 +02:00

29 lines
1.3 KiB
Diff

diff --git a/tuned/admin/admin.py b/tuned/admin/admin.py
index ddf6d9e..d26f8b0 100644
--- a/tuned/admin/admin.py
+++ b/tuned/admin/admin.py
@@ -115,7 +115,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])
@@ -133,12 +133,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: