Fixed traceback when non-existent profile is queried through
tuned-adm profile_info Resolves: rhbz#1385145
This commit is contained in:
parent
fcfdad54f5
commit
d7603eda88
28
tuned-2.7.1-profile_info-traceback-fix.patch
Normal file
28
tuned-2.7.1-profile_info-traceback-fix.patch
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
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:
|
@ -1,7 +1,7 @@
|
|||||||
Summary: A dynamic adaptive system tuning daemon
|
Summary: A dynamic adaptive system tuning daemon
|
||||||
Name: tuned
|
Name: tuned
|
||||||
Version: 2.7.1
|
Version: 2.7.1
|
||||||
Release: 2%{?dist}
|
Release: 3%{?dist}
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
Source: https://fedorahosted.org/releases/t/u/tuned/tuned-%{version}.tar.bz2
|
Source: https://fedorahosted.org/releases/t/u/tuned/tuned-%{version}.tar.bz2
|
||||||
URL: https://fedorahosted.org/tuned/
|
URL: https://fedorahosted.org/tuned/
|
||||||
@ -14,6 +14,7 @@ Requires: python-decorator, dbus-python, pygobject3-base, python-pyudev
|
|||||||
Requires: virt-what, python-configobj, ethtool, gawk, kernel-tools, hdparm
|
Requires: virt-what, python-configobj, ethtool, gawk, kernel-tools, hdparm
|
||||||
Requires: util-linux, python-perf, dbus, polkit
|
Requires: util-linux, python-perf, dbus, polkit
|
||||||
Patch0: tuned-2.7.1-pkexec-fix.patch
|
Patch0: tuned-2.7.1-pkexec-fix.patch
|
||||||
|
Patch1: tuned-2.7.1-profile_info-traceback-fix.patch
|
||||||
|
|
||||||
%description
|
%description
|
||||||
The tuned package contains a daemon that tunes system settings dynamically.
|
The tuned package contains a daemon that tunes system settings dynamically.
|
||||||
@ -115,6 +116,7 @@ It can be also used to fine tune your system for specific scenarios.
|
|||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
%patch0 -p1
|
%patch0 -p1
|
||||||
|
%patch1 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
|
||||||
@ -323,6 +325,11 @@ fi
|
|||||||
%{_mandir}/man7/tuned-profiles-compat.7*
|
%{_mandir}/man7/tuned-profiles-compat.7*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Oct 17 2016 Jaroslav Škarvada <jskarvad@redhat.com> - 2.7.1-3
|
||||||
|
- Fixed traceback when non-existent profile is queried through
|
||||||
|
tuned-adm profile_info
|
||||||
|
Resolves: rhbz#1385145
|
||||||
|
|
||||||
* Wed Sep 21 2016 Jaroslav Škarvada <jskarvad@redhat.com> - 2.7.1-2
|
* Wed Sep 21 2016 Jaroslav Škarvada <jskarvad@redhat.com> - 2.7.1-2
|
||||||
- Fixed pkexec
|
- Fixed pkexec
|
||||||
Resolves: rhbz#1377896
|
Resolves: rhbz#1377896
|
||||||
|
Loading…
Reference in New Issue
Block a user