summaryrefslogtreecommitdiff
path: root/hwdb/acpi-update.py
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2016-12-01 17:23:53 -0500
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2016-12-01 18:52:57 -0500
commit644d7e76104dc17241c5a50b4b006f6fa9bf052f (patch)
treeea2f884be5a4e7532c046913a3f7e198e9c92bf0 /hwdb/acpi-update.py
parentcd05bb8bafa808f0a40feaaa0e8cc564c0f203a7 (diff)
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.
Diffstat (limited to 'hwdb/acpi-update.py')
-rwxr-xr-xhwdb/acpi-update.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/hwdb/acpi-update.py b/hwdb/acpi-update.py
index 2dc8c7c064..50da531dc6 100755
--- a/hwdb/acpi-update.py
+++ b/hwdb/acpi-update.py
@@ -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