acpi-update.py: there is no "Error" class

Evidently this code path was never hit, because we'd crash with NameError.
The exception message also seems bogus. So just replace the whole thing
with the standard exception for invalid input.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2016-12-01 17:23:53 -05:00
parent cd05bb8baf
commit 644d7e7610

View file

@ -31,7 +31,7 @@ class PNPTableParser(HTMLParser):
elif self.state == State.AFTER_PNPID:
self.state = State.DATE
else:
raise Error("Unexpected field")
raise ValueError
self.data = ""
@ -48,7 +48,7 @@ class PNPTableParser(HTMLParser):
elif self.state == State.DATE:
self.state = State.NOWHERE
else:
raise Error("Unexpected field")
raise ValueError
def handle_data(self, data):
self.data += data