fixed KeyError exception in powertop2tuned

This commit is contained in:
Jaroslav Škarvada 2015-01-09 15:57:20 +01:00
parent 26e3883ad7
commit 940f6ede64
2 changed files with 17 additions and 1 deletions

View File

@ -0,0 +1,11 @@
--- a/experiments/powertop2tuned.py 2014-10-15 09:15:23.000000000 -0400
+++ b/experiments/powertop2tuned.py 2014-12-21 01:27:40.875480511 -0500
@@ -83,7 +83,7 @@
def handle_starttag(self, tag, attrs):
self.lastStartTag = tag
- if self.lastStartTag == "div" and dict(attrs)["id"] == "tuning":
+ if self.lastStartTag == "div" and dict(attrs).get("id") == "tuning":
self.inProperTable = True
if self.inProperTable and tag == "td":
self.tdCounter += 1

View File

@ -1,7 +1,7 @@
Summary: A dynamic adaptive system tuning daemon Summary: A dynamic adaptive system tuning daemon
Name: tuned Name: tuned
Version: 2.4.1 Version: 2.4.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/
@ -13,6 +13,7 @@ Requires(postun): systemd
Requires: python-decorator, dbus-python, pygobject3-base, python-pyudev 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 Requires: util-linux
Patch0: tuned-2.4.1-powertop2tuned-keyerror-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.
@ -81,6 +82,7 @@ It can be also used to fine tune your system for specific scenarios.
%prep %prep
%setup -q %setup -q
%patch0 -p1
%build %build
@ -227,6 +229,9 @@ fi
%{_mandir}/man7/tuned-profiles-compat.7* %{_mandir}/man7/tuned-profiles-compat.7*
%changelog %changelog
* Fri Jan 9 2015 Jaroslav Škarvada <jskarvad@redhat.com> - 2.4.1-3
- fixed KeyError exception in powertop2tuned
* Mon Jan 5 2015 Jaroslav Škarvada <jskarvad@redhat.com> - 2.4.1-2 * Mon Jan 5 2015 Jaroslav Škarvada <jskarvad@redhat.com> - 2.4.1-2
- remove 00_tuned grub2 template upon tuned uninstall - remove 00_tuned grub2 template upon tuned uninstall
resolves: rhbz#1178310 resolves: rhbz#1178310