From 4a0a965f6507b5a626bf19b5c235097cadd8d0e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaroslav=20=C5=A0karvada?= Date: Fri, 9 Jan 2015 15:51:00 +0100 Subject: [PATCH] powertop2tuned: fixed KeyError exception MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Patch provided by Michael Mansell Resolves: rhbz#1129800 Signed-off-by: Jaroslav Škarvada --- experiments/powertop2tuned.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/experiments/powertop2tuned.py b/experiments/powertop2tuned.py index ff70f0c..3e20d06 100755 --- a/experiments/powertop2tuned.py +++ b/experiments/powertop2tuned.py @@ -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