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:
parent
f55fffdd83
commit
4a0a965f65
1 changed files with 1 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue