1
0
Fork 0

powertop2tuned: fixed KeyError exception

Patch provided by Michael Mansell <michael.mansell@gmail.com>

Resolves: rhbz#1129800

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
This commit is contained in:
Jaroslav Škarvada 2015-01-09 15:51:00 +01:00
parent f55fffdd83
commit 4a0a965f65

View file

@ -83,7 +83,7 @@ class PowertopHTMLParser(HTMLParser):
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