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